<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Zack Philipps</title>
    <description>The latest articles on DEV Community by Zack Philipps (@zackphilipps).</description>
    <link>https://dev.to/zackphilipps</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F11926%2F9cae3b17-630b-4449-9a77-99a1469e7673.jpg</url>
      <title>DEV Community: Zack Philipps</title>
      <link>https://dev.to/zackphilipps</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zackphilipps"/>
    <language>en</language>
    <item>
      <title>Store GCLID in Cookie and Send to Hubspot</title>
      <dc:creator>Zack Philipps</dc:creator>
      <pubDate>Mon, 25 Sep 2017 02:50:47 +0000</pubDate>
      <link>https://dev.to/zackphilipps/store-gclid-in-cookie-and-send-to-hubspot-8c7</link>
      <guid>https://dev.to/zackphilipps/store-gclid-in-cookie-and-send-to-hubspot-8c7</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F09%2Fdigital-marketing-graph-1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F09%2Fdigital-marketing-graph-1.jpg" alt="Store GCLID in Cookie and Send to Hubspot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, you've got an AdWords campaign running, which means you've got an ad that links to your website. When someone clicks your ad, the URL to the page on your website has a GCLID parameter appended to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://yourwebsite.com/your-landing-page/?gclid=blah
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This works perfectly fine if the user converts &lt;strong&gt;on that page.&lt;/strong&gt; You can, through several methods, directly attribute this conversion to your specific ad. Then, if the user uses the same email address when purchasing offline as they did in the form, you can attribute that purchase to your ad as well.&lt;/p&gt;

&lt;p&gt;But what if the user navigates elsewhere on the site? Unless you've got some JavaScript appending the GCLID to every link, it will be stripped as soon as the user clicks something.&lt;/p&gt;


&lt;h2&gt;
  
  
  Enter The Cookie: Offline Conversion Tracking's Best Friend
&lt;/h2&gt;

&lt;p&gt;A better method is &lt;a href="https://support.google.com/adwords/answer/7012522?hl=en" rel="noopener noreferrer"&gt;store the GCLID in a cookie&lt;/a&gt;. That way, even if the user completely closes the site and revisits it later by typing in the domain name... The cookie will still exist.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F09%2Fcookie-monster.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F09%2Fcookie-monster.jpg" alt="Store GCLID in Cookie and Send to Hubspot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since I've been asked to do this at work a few times, I've taken the liberty of creating a utility function – with a few dependencies. Since it's written in vanilla JavaScript, &lt;strong&gt;it can be added directly to Google Tag Manager.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This solution can be applied to any tracking parameters you want to pass along with your form submissions anywhere on your site. For example, another use case would be to pass UTM parameters with form submissions that get sent to Salesforce, since Salesforce CRM doesn't have a global tracking code like Hubspot and Google Analytics.&lt;/p&gt;

&lt;p&gt;You can also pass along any parameters you want to get more granular insights and reporting on any platform.&lt;/p&gt;
&lt;h3&gt;
  
  
  Dependencies
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Get Cookie
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getCookie(name) {  
  var value = '; ' + document.cookie;
  var parts = value.split('; ' + name + '=');
  if (parts.length == 2)
    return parts.pop().split(';').shift();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Retrieves a cookie value based on its name. &lt;strong&gt;Usage:&lt;/strong&gt; &lt;code&gt;getCookie('gclid');&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Set Cookie
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function setCookie(name, value, days) {  
  var date = new Date();
  date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
  var expires = '; expires=' + date.toGMTString();
  document.cookie = name + '=' + value + expires + ';path=/';
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Creates or saves a cookie. Name it, set the value, and set the number of days it will exist. &lt;strong&gt;Usage:&lt;/strong&gt; &lt;code&gt;setCookie('gclid', 'blah', 365);&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Get Parameter
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getParam(p) {  
  var match = RegExp('[?&amp;amp;]' + p + '=([^&amp;amp;]*)').exec(window.location.search);
  return match &amp;amp;&amp;amp; decodeURIComponent(match[1].replace(/\+/g, ' '));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Gets the value of a URL parameter by name. &lt;strong&gt;Usage:&lt;/strong&gt; &lt;code&gt;getParam('gclid');&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  All Together Now
&lt;/h3&gt;

&lt;p&gt;This is the part you copy and paste. However, &lt;strong&gt;keep reading the rest of this post,&lt;/strong&gt; because this code block won't do anything on its own. It just defines functions; it's on you to use them to suit your needs.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt; &lt;code&gt;assignTrackingParameterToCookie('gclid', 'hubspot');&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;No need to wrap this in a &lt;code&gt;window.onload&lt;/code&gt; because that is already taken care of. Simply repeat for each parameter you want to save. &lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;assignTrackingParameterToCookie('gclid', 'hubspot');  
assignTrackingParameterToCookie('utm_source', 'gform');  
assignTrackingParameterToCookie('utm_campaign', 'gform');  
assignTrackingParameterToCookie('utm_referral', 'gform');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Currently, the only option for the 2nd argument (&lt;code&gt;formType&lt;/code&gt;) besides &lt;code&gt;hubspot&lt;/code&gt; is &lt;code&gt;gform&lt;/code&gt;, which is Gravity Form. However, this script can easily be modified to allow for other form types.&lt;/p&gt;

&lt;h4&gt;
  
  
  Hubspot
&lt;/h4&gt;

&lt;p&gt;The way this works for Hubspot forms is that you will need to create hidden fields that match your parameter names &lt;strong&gt;exactly.&lt;/strong&gt; So if your parameter is &lt;code&gt;gclid&lt;/code&gt;, you will need a hidden field called &lt;code&gt;gclid&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F09%2Fhubspot-edit-screen-1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F09%2Fhubspot-edit-screen-1.jpg" alt="Store GCLID in Cookie and Send to Hubspot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Gravity Forms
&lt;/h4&gt;

&lt;p&gt;For Gravity Forms, you need to make a Text field – NOT hidden field – so you can add a class to it. The class must match your parameter name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F09%2Fgravity-forms-screencast.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F09%2Fgravity-forms-screencast.gif" alt="Store GCLID in Cookie and Send to Hubspot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope you find this useful! It can be used in any number of ways. We're certainly getting a lot of mileage out of it at &lt;a href="https://elementthree.com/" rel="noopener noreferrer"&gt;Element Three&lt;/a&gt;. Any questions or suggestions, please let me know in the comments section below.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>marketing</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How Code Linting Changed My Life</title>
      <dc:creator>Zack Philipps</dc:creator>
      <pubDate>Sat, 18 Mar 2017 23:22:07 +0000</pubDate>
      <link>https://dev.to/zackphilipps/how-code-linting-changed-my-life</link>
      <guid>https://dev.to/zackphilipps/how-code-linting-changed-my-life</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F03%2Flinting-in-action.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2017%2F03%2Flinting-in-action.png" alt="How Code Linting Changed My Life"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it came to linting, I was always dumb about it. "Man that's too annoying, turn it off!" But what I didn't realize was that with 30 seconds of configuration per language, usually in the form of a dotfile in my home folder, I could pick and choose specifically which errors and warnings showed up. So if I don't want to be notified every time a coworker decides to write CSS without a space after the colon, I don't have to. Or if I don't want to be notified that my partial Twig template doesn't start with a &lt;code&gt;&amp;lt;!doctype&amp;gt;&lt;/code&gt; declaration... You get the picture.&lt;/p&gt;

&lt;p&gt;Now I'm obsessed! There's so much utility in seeing syntax errors as you type as opposed to when the browser refreshes. Linting is another tool that transforms your text editor into an IDE. All the cool kids do it, and it's never too late to start. ...yeah. You can tell I haven't blogged in a while...&lt;/p&gt;

&lt;p&gt;Basically, if you use Atom, all you have to do is install the &lt;a href="https://atom.io/packages/linter" rel="noopener noreferrer"&gt;base linter package&lt;/a&gt;, and then add your desired languages on top of that. Then, figure out how to configure them to your liking. Enjoy. :)&lt;/p&gt;




&lt;p&gt;Related: &lt;a href="https://dev.to/zackphilipps/how-i-switched-from-sublime-text-to-atom-temp-slug-339130"&gt;How I Switched from Sublime Text to Atom&lt;/a&gt;&lt;/p&gt;

</description>
      <category>atom</category>
      <category>codelinting</category>
      <category>editor</category>
      <category>linter</category>
    </item>
    <item>
      <title>How I Switched from Sublime Text to Atom</title>
      <dc:creator>Zack Philipps</dc:creator>
      <pubDate>Mon, 01 Aug 2016 17:45:09 +0000</pubDate>
      <link>https://dev.to/zackphilipps/how-i-switched-from-sublime-text-to-atom</link>
      <guid>https://dev.to/zackphilipps/how-i-switched-from-sublime-text-to-atom</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2016%2F08%2FScreen-Shot-2016-08-01-at-13-26-04.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2016%2F08%2FScreen-Shot-2016-08-01-at-13-26-04.png" alt="How I Switched from Sublime Text to Atom"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;a href="https://atom.io/themes/atom-material-ui" rel="noopener noreferrer"&gt;Atom Material Dark&lt;/a&gt; with &lt;a href="http://panda.siamak.work/" rel="noopener noreferrer"&gt;Panda Syntax&lt;/a&gt; and &lt;a href="https://madmalik.github.io/mononoki/" rel="noopener noreferrer"&gt;Mononoki&lt;/a&gt; typeface)&lt;/p&gt;

&lt;p&gt;When I first discovered Sublime Text, I fell in love with its configurability and the availability of packages to extend its features. When Atom first came out, I tried it for a little bit, but quickly became frustrated because there were still some kinks that needed resolved.&lt;/p&gt;

&lt;p&gt;Fast forward about 2 years to when I start my new job at &lt;a href="http://elementthree.com" rel="noopener noreferrer"&gt;Element Three.&lt;/a&gt; The whole dev team is using Atom, so I figure I'll give it another shot.&lt;/p&gt;

&lt;p&gt;There was definitely an adjustment period. But, after a few weeks, I realized that Atom did everything Sublime did, except better! And more!&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2016%2F08%2Fatom-logo-1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2016%2F08%2Fatom-logo-1.jpg" alt="How I Switched from Sublime Text to Atom"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right off the bat Atom comes with default packages, which you can disable. I immediately disabled the &lt;code&gt;wrap-guide&lt;/code&gt; package because I couldn't take the line running through my code, and I don't ascribe to the 80-character preference. But this in itself is an improvement over Sublime. Here are some more.&lt;/p&gt;

&lt;h4&gt;
  
  
  Out-of-the-box Improvements over Sublime
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Better default theme and syntax highlighting &lt;/li&gt;
&lt;li&gt;More intuitive Settings panel &lt;/li&gt;
&lt;li&gt;Spell-check &lt;/li&gt;
&lt;li&gt;Markdown preview, which renders all the expensive markdown writing apps out there totally useless &lt;/li&gt;
&lt;li&gt;Git integration, eliminating the need for &lt;a href="https://github.com/jisaacks/GitGutter" rel="noopener noreferrer"&gt;GitGutter.&lt;/a&gt; Atom will indicate changes to your &lt;code&gt;git&lt;/code&gt; projects by changing the color of file/directory names and the line numbers in your files &lt;/li&gt;
&lt;li&gt;Better autocomplete suggestions, since it will search your entire project for matches to what you are typing as opposed to just the file you are in at the moment &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/xavi-/sublime-selectuntil" rel="noopener noreferrer"&gt;SelectUntil&lt;/a&gt; behavior by default &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/titoBouzout/SideBarEnhancements" rel="noopener noreferrer"&gt;SideBarEnhancements&lt;/a&gt; behavior by default &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/atom/apm" rel="noopener noreferrer"&gt;Atom's package manager&lt;/a&gt; is bundled. No more having to press control-backtick, finding that code snippet online, and pasting it in the console 🔥 &lt;/li&gt;
&lt;li&gt;Thriving developer community that is responsible for all of this awesomeness&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Major adjustments
&lt;/h4&gt;

&lt;p&gt;In fact, most of what I had to adjust to with Atom was keybindings. I had a few custom ones set up in Sublime that I struggled with in Atom. This is because I was adding them incorrectly. (They're case sensitive.)&lt;/p&gt;

&lt;p&gt;As mentioned in &lt;a href="https://dev.to/zackphilipps/a-front-end-developers-sublime-text-setup-temp-slug-48528"&gt;A Front End Developer's Sublime Text Setup,&lt;/a&gt; I had been used to using &lt;code&gt;shift-cmd-d&lt;/code&gt; to &lt;strong&gt;delete&lt;/strong&gt; lines and &lt;code&gt;alt-cmd-d&lt;/code&gt; to &lt;strong&gt;duplicate&lt;/strong&gt; lines. Well, I added my keybindings like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'atom-workspace atom-text-editor:not([mini])':  
  'shift-cmd-D': 'unset!'
  'shift-cmd-D': 'editor:delete-line'
  'alt-cmd-D': 'editor:duplicate-lines'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Delete line&lt;/em&gt; worked, but not &lt;em&gt;duplicate line.&lt;/em&gt; It's because Atom was expecting me to type &lt;code&gt;alt-cmd-shift-D&lt;/code&gt; because I had entered it as a capital &lt;code&gt;D&lt;/code&gt;. This is the correct way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'atom-workspace atom-text-editor:not([mini])':  
  'shift-cmd-D': 'unset!'
  'shift-cmd-D': 'editor:delete-line'
  'alt-cmd-d': 'editor:duplicate-lines'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The other big thing to get used to was the behavior of the &lt;code&gt;tab&lt;/code&gt; key. In Sublime, you could use &lt;code&gt;tab&lt;/code&gt; (much like a terminal) to expand snippets and use suggested autocompletions. In Atom, it seems like the &lt;code&gt;return&lt;/code&gt; key is more reliable for autocomplete, while &lt;code&gt;tab&lt;/code&gt; still works for snippets. Kinda weird.&lt;/p&gt;

&lt;p&gt;^ that may just be because I am using Emmet, which in Sublime, allows &lt;code&gt;tab&lt;/code&gt; to expand all of its abbreviations. I ended up adding another keybinding. Emmet's default keybinding is &lt;code&gt;ctrl+e&lt;/code&gt; to expand abbreviations; I changed it to &lt;code&gt;cmd-e&lt;/code&gt; since I wasn't using it for anything else and it's more intuitive to my fingers.&lt;/p&gt;




&lt;p&gt;Now, on to the fun stuff: packages! I was able to find a replacement for every package I loved in Sublime, and all of these either matched or surpassed their predecessors.&lt;/p&gt;

&lt;p&gt;I was also able to create &lt;a href="https://atom.io/packages/zp-acf-snippets" rel="noopener noreferrer"&gt;my first Atom package.&lt;/a&gt; Thanks to &lt;a href="https://github.com/atom/apm" rel="noopener noreferrer"&gt;apm&lt;/a&gt;, it was incredibly easy to publish.&lt;/p&gt;

&lt;h4&gt;
  
  
  Packages
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/atom-beautify" rel="noopener noreferrer"&gt;Atom Beautify&lt;/a&gt; – Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom.&lt;/p&gt;

&lt;p&gt;This replaced &lt;em&gt;JavaScript Beautify&lt;/em&gt; and &lt;em&gt;SassBeautify&lt;/em&gt; from my Sublime setup. As you can see, it handles a lot more languages than that.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://emmet.io/" rel="noopener noreferrer"&gt;Emmet&lt;/a&gt; – Another time-saving package providing many useful HTML snippets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/file-icons" rel="noopener noreferrer"&gt;File Icons&lt;/a&gt; – Assign file extension icons and colors for improved visual grepping.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/language-blade" rel="noopener noreferrer"&gt;Language Blade&lt;/a&gt; – Syntax highlighter for the Blade templating engine used in Laravel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/language-twig" rel="noopener noreferrer"&gt;Language Twig&lt;/a&gt; – Twig support for Atom.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/less-than-slash" rel="noopener noreferrer"&gt;Less Than Slash&lt;/a&gt; – Adds automatic closing of HTML tags when less-than, slash (&lt;code&gt;&amp;lt;/&lt;/code&gt;) is typed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/markdown-writer" rel="noopener noreferrer"&gt;Markdown Writer&lt;/a&gt; – Make Atom a better Markdown editor and an easier static blogging tool.&lt;/p&gt;

&lt;p&gt;I like this one because it makes Atom behave more like Ghost. I can press &lt;code&gt;cmd-b&lt;/code&gt; to make my markdown text bold, &lt;code&gt;cmd-k&lt;/code&gt; to insert a hyperlink, and so on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/split-diff" rel="noopener noreferrer"&gt;Split Diff&lt;/a&gt; – A split pane diff tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2016%2F08%2Fsplit-diff2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2016%2F08%2Fsplit-diff2.gif" alt="How I Switched from Sublime Text to Atom"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/sync-settings" rel="noopener noreferrer"&gt;Sync Settings&lt;/a&gt; – Synchronize package settings, keymap and installed packages across devices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/tree-view-autoresize" rel="noopener noreferrer"&gt;Tree View Autoresize&lt;/a&gt; – Autoresize the tree view when opening/closing folders.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2016%2F08%2Ftree-view-autoresize.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2016%2F08%2Ftree-view-autoresize.gif" alt="How I Switched from Sublime Text to Atom"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://atom.io/packages/zp-acf-snippets" rel="noopener noreferrer"&gt;ZP ACF Snippets&lt;/a&gt; – This is a collection of Atom snippets for the Advanced Custom Fields WordPress plugin. Based on the &lt;a href="https://github.com/iamhexcoder/acf_snippets" rel="noopener noreferrer"&gt;Advanced Custom Fields Snippets for Sublime Text&lt;/a&gt; package.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I have since added several more useful packages to my stack, including &lt;a href="https://atom.io/packages/atom-html-preview" rel="noopener noreferrer"&gt;atom-html-preview&lt;/a&gt;, &lt;a href="https://atom.io/packages/autocomplete-paths" rel="noopener noreferrer"&gt;autocomplete-paths&lt;/a&gt;, &lt;a href="https://atom.io/packages/git-time-machine" rel="noopener noreferrer"&gt;git-time-machine&lt;/a&gt;, &lt;a href="https://atom.io/packages/hyperlink-hyperclick" rel="noopener noreferrer"&gt;hyperlink-hyperclick&lt;/a&gt;, &lt;a href="https://atom.io/packages/merge-conflicts" rel="noopener noreferrer"&gt;merge-conflicts&lt;/a&gt;, &lt;a href="https://atom.io/packages/sublime-block-comment" rel="noopener noreferrer"&gt;sublime-block-comment&lt;/a&gt;, more languages, and linters.&lt;/p&gt;

&lt;p&gt;"Linters?" &lt;a href="http://zackphilipps.com/how-code-linting-changed-my-life/" rel="noopener noreferrer"&gt;Read about how code linting has changed my life.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sublime</category>
      <category>atom</category>
      <category>editor</category>
    </item>
    <item>
      <title>A WordPress Development Workflow for Small Teams in 2015</title>
      <dc:creator>Zack Philipps</dc:creator>
      <pubDate>Wed, 29 Jul 2015 01:01:56 +0000</pubDate>
      <link>https://dev.to/zackphilipps/a-wordpress-development-workflow-for-small-teams-in-2015</link>
      <guid>https://dev.to/zackphilipps/a-wordpress-development-workflow-for-small-teams-in-2015</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2F19.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2F19.jpg" alt="A WordPress Development Workflow for Small Teams in 2015"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The future of web development is here, and has been for a while. I'm talking about front end tools that speed up workflow like Grunt and Sass. The developers that work on WordPress core know that, and they are utilizing it. WordPress theme developers even utilize it. Maybe even plugin developers. So why can't we utilize it on a per-project basis when developing WordPress websites?&lt;/p&gt;

&lt;p&gt;We &lt;strong&gt;can.&lt;/strong&gt; We &lt;strong&gt;can&lt;/strong&gt; develop every WordPress site locally. We &lt;strong&gt;can&lt;/strong&gt; use Grunt, Sass, and NPM on every single project. If we must, we &lt;strong&gt;can&lt;/strong&gt; even share our local sites with the outside world for previewing or collaborating.&lt;/p&gt;

&lt;p&gt;We &lt;strong&gt;don't&lt;/strong&gt; have to install a different WordPress plugin for each front end tool we want to use. We &lt;strong&gt;don't&lt;/strong&gt; have to do all of our development work on remote servers. Even though that may seem easier or faster, it's not ideal. You need to have a way to stage a bunch of work without affecting what's already there.&lt;/p&gt;

&lt;p&gt;A WordPress fundamental that really complicates things is this: &lt;strong&gt;the codebase and the database are completely separate from each other.&lt;/strong&gt; So we need an easy way to migrate the site's code from local to development server and back, to production server. We also need a separate way to do this with the database.&lt;/p&gt;

&lt;p&gt;Here's a list of the tools that are instrumental in making this happen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.mamp.info/en/" rel="noopener noreferrer"&gt;MAMP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://scratchtheme.com" rel="noopener noreferrer"&gt;Scratch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bitbucket.org/" rel="noopener noreferrer"&gt;Bitbucket&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.digitalocean.com/" rel="noopener noreferrer"&gt;DigitalOcean&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codeship.com" rel="noopener noreferrer"&gt;Codeship&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/wp-sync-db/wp-sync-db" rel="noopener noreferrer"&gt;WP Sync DB&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below, I'll explain these tools in a bit more detail. After that, I'll explain how to use them. You might want to get in the tutorial-following mood to continue reading, but following along isn't required for learning. And you can certainly use different tools.&lt;/p&gt;




&lt;h4&gt;
  
  
  MAMP
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://www.mamp.info/en/" rel="noopener noreferrer"&gt;MAMP&lt;/a&gt; stands for Mac, Apache, MySQL, and PHP. It's what we use to develop WordPress sites locally. You have to have it or something comparable. I like MAMP PRO because it's so easy to use and has a nice design.&lt;/p&gt;

&lt;h4&gt;
  
  
  Scratch
&lt;/h4&gt;

&lt;p&gt;&lt;a href="http://scratchtheme.com" rel="noopener noreferrer"&gt;Scratch&lt;/a&gt; is the world's first &lt;a href="http://advancedcustomfields.com/" rel="noopener noreferrer"&gt;Advanced Custom Fields&lt;/a&gt;-ready WordPress theme. It's not so much a theme as a springboard for building your own fully custom WordPress themes.&lt;/p&gt;

&lt;p&gt;Scratch has its own Gruntfile that takes care of SCSS and JS compilation, concatenation, and minification. It also optimizes images as they are uploaded to the WordPress media library. It uses BrowserSync for live reloading and synchronized cross-browser/cross-device testing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Bitbucket
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://bitbucket.org/" rel="noopener noreferrer"&gt;Bitbucket&lt;/a&gt; provides Git and Mercurial code management for teams. It has a bit more of a flexible pricing plan with regard to private repositories. You could easily use an organization plan with GitHub.&lt;/p&gt;

&lt;h4&gt;
  
  
  DigitalOcean
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://www.digitalocean.com/" rel="noopener noreferrer"&gt;DigitalOcean&lt;/a&gt; provides simple cloud hosting for developers. We &amp;lt;3 it because we have 100% control of all of our servers (or "Droplets", as DO labels them). DO has a gorgeous web app for managing all of the droplets in the browser, but to be honest, if you go with DO you'll be doing most of your work in the terminal. I will talk about our droplet setup in another post, but it's nothing you can't find while browsing DO's invaluable tutorials and forums.&lt;/p&gt;

&lt;h4&gt;
  
  
  Codeship
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://codeship.com" rel="noopener noreferrer"&gt;Codeship&lt;/a&gt; is a continuous delivery platform. What that means is you can configure automated testing and deployment to be run on every push you make to your repository. It's pretty sick. I'll explain further on in the post. There are loads of CI and CD platforms out there, but we felt this one was the most small-team-friendly due to its ease of use and pricing structure.&lt;/p&gt;

&lt;h4&gt;
  
  
  WP Sync DB
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/wp-sync-db/wp-sync-db" rel="noopener noreferrer"&gt;WP Sync DB&lt;/a&gt; is a WordPress plugin that allows you to pull and push your databases with automatic find and replace for URLs, all at the click of a button or two.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Process – Setup, Pushing, and Pulling
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2Fbuzzlightyeareverywhere.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2Fbuzzlightyeareverywhere.png" alt="A WordPress Development Workflow for Small Teams in 2015"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Local Setup
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Install MAMP or MAMP Pro. &lt;/li&gt;
&lt;li&gt;Install WordPress. &lt;/li&gt;
&lt;li&gt;&lt;a href="http://scratchtheme.com/docs/getting-started/" rel="noopener noreferrer"&gt;Follow the steps to get Scratch up and running.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Push the final codebase to a new Bitbucket repo.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Obviously, you won't have to install MAMP every time you want to work on a new WordPress site, but you will have to install WordPress and Scratch for each project, so you'll want to streamline this as much as possible. Our approach was to install everything just the way we always want it, and then create a Bitbucket repository containing that code and an SQL dump of the database. We call it "Perfect Setup." Then, when it's time to start a new project, we simply clone Perfect Setup and push it to a brand new Bitbucket repo.&lt;/p&gt;

&lt;p&gt;But, I decided to take it one step further. It's kind of pain having to set up a new DB and DB user everytime, and then going through the WP install process, linking up the &lt;code&gt;wp-config.php&lt;/code&gt; file. So I created &lt;code&gt;perfect_setup.sh&lt;/code&gt;. &lt;a href="https://github.com/zackphilipps/new-wp-mamp-shell" rel="noopener noreferrer"&gt;You can view the GitHub repo here.&lt;/a&gt; It shaves minutes off of setup time, and these minutes add up.&lt;/p&gt;

&lt;p&gt;I would also share Perfect Setup with you here, but we use two premium plugins (&lt;a href="http://www.advancedcustomfields.com/pro/" rel="noopener noreferrer"&gt;Advanced Custom Fields Pro&lt;/a&gt; and &lt;a href="http://www.gravityforms.com/" rel="noopener noreferrer"&gt;Gravity Forms&lt;/a&gt;, which are well worth it), so we have to keep it private. Plus, your perfect setup may not be Perfect Setup. I encourage you to make your own!&lt;/p&gt;

&lt;h4&gt;
  
  
  Remote Setup
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Set up a dev server by adding a Droplet in DigitalOcean. &lt;/li&gt;
&lt;li&gt;Reserve a directory on your dev server for the site. &lt;/li&gt;
&lt;li&gt;Configure DNS for the dev site. &lt;/li&gt;
&lt;li&gt;Clone your new Bitbucket repo to the reserved directory. &lt;/li&gt;
&lt;li&gt;Push your local database using WP Sync DB. &lt;/li&gt;
&lt;li&gt;Integrate your Bitbucket repo and remote server with Codeship.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For our LEMP stack and for reserving directories, we use a CLI called &lt;a href="https://rtcamp.com/easyengine/" rel="noopener noreferrer"&gt;EasyEngine&lt;/a&gt;. You simply run &lt;code&gt;sudo ee site create example.com --wpfc&lt;/code&gt;, and it creates the site directory, creates the Nginx configuration file, and creates the symbolic link to the newly created directory. It also creates the WordPress database, installs WordPress, and generates the &lt;code&gt;wp-config.php&lt;/code&gt; file. Sorta like &lt;code&gt;perfect_setup.sh&lt;/code&gt; (you can see where I got the inspiration).&lt;/p&gt;

&lt;p&gt;Once you've got the directory reserved, you can clone your project to said directory. You'll want to clone using SSH so that your Codeship deployments work. &lt;a href="https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html" rel="noopener noreferrer"&gt;Here's a guide for getting Bitbucket/SSH set up on your server.&lt;/a&gt; Once you've done that, you can do something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /var/www/example.com/htdocs  
sudo rm -rf *  
git clone git@bitbucket.org:example-user/example-site.git .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don't run &lt;code&gt;sudo rm -rf *&lt;/code&gt; unless you know what you're doing. That command removes everything in the current working directory, recursively, with no way to get it back.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's where WP Sync DB comes in. You need to get the new local database you just set up linked with the remote site. Right now, if you've configured your DNS, when you visit your dev site you will see a blank white screen. This is because the active database is searching for Twentyfifteen, the current default WordPress theme. However, you have Scratch installed. (You may actually see Twentyfifteen depending on whether or not you left the theme directory in your WordPress installation.)&lt;/p&gt;

&lt;p&gt;Even though you have a blank white screen on the front end, you can still log in to WordPress. You need to activate the WP Sync DB plugin to use it. Then, you must go to &lt;em&gt;Tools &amp;gt; Migrate DB &amp;gt; Settings&lt;/em&gt;. Check the boxes to allow both push and pull requests, and then copy the connection info.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2FScreenshot-2015-07-28-21-56-58-copy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2FScreenshot-2015-07-28-21-56-58-copy.png" alt="A WordPress Development Workflow for Small Teams in 2015"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back on your local machine, go to &lt;em&gt;Tools &amp;gt; Migrate DB&lt;/em&gt;, and click Push. Paste the connection info you copied from the dev site. I usually check "Backup the remote database before replacing it" and "Save Migration Profile", adding the word "PUSH" or "PULL" to the end of the profile name depending on what I'm doing. This allows me to push the database next time with 2 clicks, and if I add a pull profile from the dev site, the names of the profiles won't be the same and confuse me.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2FScreenshot-2015-07-28-22-05-00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2FScreenshot-2015-07-28-22-05-00.png" alt="A WordPress Development Workflow for Small Teams in 2015"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, assuming you've configured your DNS correctly, when you navigate to your dev site you will see your perfect setup in all its glory! Well, just as it is on your local machine I hope.&lt;/p&gt;

&lt;p&gt;It's time to add our project to Codeship. Simply add your Bitbucket repo and skip the test configuration for now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2FScreenshot-2015-07-28-22-14-39.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2FScreenshot-2015-07-28-22-14-39.png" alt="A WordPress Development Workflow for Small Teams in 2015"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; We never use automated testing for WordPress websites. It's a little bit overkill. WordPress core and plugin developers are already doing this. I do use it for Scratch and Perfect Setup, though. Just to test the gruntfiles.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To configure your deployment pipeline, go to &lt;em&gt;Project Settings &amp;gt; Deployment.&lt;/em&gt; Add a pipeline for the &lt;code&gt;master&lt;/code&gt; branch. You'll notice there are a few third-party integrations to take advantage of, like Amazon S3 and Heroku. We're using DigitalOcean, so we need to choose &lt;em&gt;Custom Script.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2FScreenshot-2015-07-28-22-19-38.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F07%2FScreenshot-2015-07-28-22-19-38.png" alt="A WordPress Development Workflow for Small Teams in 2015"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The script you use for this depends entirely on your dev server's configuration, but ours looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh user@example.com 'cd /var/www/example.com/htdocs &amp;amp;&amp;amp; sudo git add . --ignore-removal &amp;amp;&amp;amp; sudo git stash &amp;amp;&amp;amp; sudo git pull origin master'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, we SSH in to our server as &lt;code&gt;user&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It would probably be a great idea to add a user just for Codeship. You could call it... &lt;code&gt;codeship&lt;/code&gt;? Run &lt;code&gt;sudo adduser codeship&lt;/code&gt; on your dev server and store the password you assign it somewhere.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then, we navigate to the directory where our project has been cloned. Lastly, we add all untracked files, stash any changes that have occurred on the dev site, and pull in any changes from the &lt;code&gt;master&lt;/code&gt; branch of the &lt;code&gt;origin&lt;/code&gt; remote. If you're assuming that any differences between the dev site and the repo will be overwritten by the repo, you are absolutely correct. If you want to keep any of those differences, it's important to &lt;strong&gt;first manually commit them on the dev server and push them to your repo, and then pull them down to your local machine.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you save this deployment pipeline, your custom script will be run on the next successful &lt;code&gt;git push origin master&lt;/code&gt;. This is why it's important to use the SSH version of the &lt;code&gt;origin&lt;/code&gt; remote (you can test your remotes by running &lt;code&gt;git remote -v&lt;/code&gt;), because since your script is run automatically, you can't enter a password unless you store it in plain text on Codeship. With SSH, Bitbucket uses the SSH keys you set up to authenticate the &lt;code&gt;git pull&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There are a couple of other things you need to do to ensure your deployment runs successfully. You need to add the Codeship public SSH key, which is set on a per-project basis, to &lt;code&gt;codeship&lt;/code&gt;'s &lt;code&gt;authorized_keys&lt;/code&gt; file, located at &lt;code&gt;/home/codeship/.ssh/authorized_keys&lt;/code&gt;. The key is found in &lt;em&gt;Project Settings &amp;gt; General &amp;gt; SSH public key.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Lastly, you need to make sure &lt;code&gt;codeship&lt;/code&gt; is a member of the group &lt;code&gt;sudo&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo usermod -a -G sudo codeship
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and that it can run &lt;code&gt;git&lt;/code&gt; commands using &lt;code&gt;sudo&lt;/code&gt; without having to enter a password. To do this, run &lt;code&gt;sudo visudo&lt;/code&gt; from your dev server and find this line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and change it to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL, NOPASSWD: /usr/bin/git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;/usr/bin/git&lt;/code&gt; may differ for you. Run &lt;code&gt;which git&lt;/code&gt; to find out where your &lt;code&gt;git&lt;/code&gt; command lives.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, you should test your deployment! I always like to add the Codeship status badge to my project's &lt;code&gt;README.md&lt;/code&gt;. It looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[![Codeship Status for user/example](https://codeship.com/projects/&amp;lt;PROJECT_UUID&amp;gt;/status?branch=master)](https://codeship.com/projects/&amp;lt;PROJECT_ID&amp;gt;)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and is found in &lt;em&gt;Project Settings &amp;gt; Notification &amp;gt; Status Images &amp;gt; Copy Markdown Syntax.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Work Work Work
&lt;/h4&gt;

&lt;p&gt;For now, you're done configuring and you're free to work on your project in peace. Enjoy hassle-free deployment of both the codebase AND the database!&lt;/p&gt;

&lt;p&gt;You'll want to watch out for permissions on your dev server, as they'll be overwritten every time your deployment is run. We use a &lt;a href="http://sublimetext.info/docs/en/extensibility/snippets.html" rel="noopener noreferrer"&gt;snippet&lt;/a&gt; in Sublime called &lt;code&gt;permissions&lt;/code&gt; that looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find * -type d -print0 | sudo xargs -0 chmod 0755 &amp;amp;&amp;amp; find * -type f -print0 | sudo xargs -0 chmod 0644 &amp;amp;&amp;amp; sudo chown -R www-data:www-data *
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to quickly fix ownership and permissions on a per-site basis. You run this from the individual site's root directory on the server. You could also add this to your deployment script, but that would require giving the &lt;code&gt;codeship&lt;/code&gt; user privileges to use &lt;code&gt;sudo&lt;/code&gt; on &lt;strong&gt;any&lt;/strong&gt; command without being prompted for a password.&lt;/p&gt;

&lt;h4&gt;
  
  
  Production Deployment
&lt;/h4&gt;

&lt;p&gt;When you're all set to move to production, you'll want to follow the same Remote Setup process that you did for development. Then, simply add another deployment in Codeship. We use the &lt;code&gt;production&lt;/code&gt; branch for production deployment. Then, on our local machines, we switch to the &lt;code&gt;production&lt;/code&gt; branch, make sure it contains the same code as &lt;code&gt;master&lt;/code&gt;, and run &lt;code&gt;git push origin production&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Finally, you just have to add another migration profile using WP Sync DB called &lt;code&gt;productionsite.com PUSH&lt;/code&gt;. Then push! From now on, both your dev and prod deployments will be easy as pie.&lt;/p&gt;




&lt;h4&gt;
  
  
  Pro Git Tips
&lt;/h4&gt;

&lt;p&gt;If you don't have a &lt;code&gt;.gitignore&lt;/code&gt; file in your perfect setup, you definitely want one. You want to at the very least ignore the &lt;code&gt;wp-config.php&lt;/code&gt; file and all &lt;code&gt;node_modules&lt;/code&gt;. The &lt;code&gt;wp-config.php&lt;/code&gt; file will be inherently different on each server, so there's no reason to have it in the repo, and NPM modules have so many nested directories and files that they can cause problems on remote servers (which I have experienced first-hand). Besides, you're only going to be running Grunt when you're developing locally, so there's no reason to ever have them in a remote environment.&lt;/p&gt;

&lt;p&gt;Here's our &lt;code&gt;.gitignore&lt;/code&gt; in its entirety:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Include your project-specific ignores in this file
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db  
Thumbs.db

# Gruntfile, gulpfile, Sass cache and node modules #
####################################################
Gruntfile.js  
gulpfile.js  
.sass-cache/
node_modules/

# Backups and Uploads #
#######################
wp-content/backup*/  
wp-content/uploads

# W3 Total Cache #
##################
wp-content/cache/  
wp-content/w3tc-config/*  
!wp-content/w3tc-config/master.php

# Ignore all WP themes except Scratch #
#######################################
wp-content/themes/*  
!wp-content/themes/scratch-theme

# WP Config #
#############
wp-config.php

# iThemes #
###########
nginx.conf

# InfiniteWP #
##############
wp-content/infinitewp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your remote environments, you will want to set some sensible &lt;code&gt;git&lt;/code&gt; defaults for each project, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Suppress long filename warnings/errors
sudo git config --system core.longpaths true

# Tell git to ignore changes in file ownership/permissions
sudo git config core.fileMode false

# Display the status in a pager so you can see the whole thing
sudo git config --global pager.status true

# Suppress moar warnings
sudo git config core.safecrlf false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also have a Sublime snippet for this, called &lt;code&gt;gitconfig&lt;/code&gt;, that expands to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo git config --system core.longpaths true &amp;amp;&amp;amp; sudo git config core.fileMode false &amp;amp;&amp;amp; sudo git config --global pager.status true &amp;amp;&amp;amp; sudo git config core.safecrlf false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Restricting Access to Dev Sites
&lt;/h4&gt;

&lt;p&gt;You may not want your dev sites to be accessible to just anyone. There's only one way to 100% keep your site off of search engines, and that's to make sure your site pulls up a login form no matter where the user lands.&lt;/p&gt;

&lt;p&gt;Accomplishing this with WordPress is super easy. First, you'll want to make sure the WordPress function &lt;code&gt;auth_redirect()&lt;/code&gt; works on the front end of your site. It only works on the back end by default. Add this to your &lt;code&gt;functions.php&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* MAKE AUTH_REDIRECT WORK ON FRONT END */
add_filter( 'auth_redirect_scheme', 'wpse16975_check_loggedin' );
function wpse16975_check_loggedin() {
    return 'logged_in';
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you can add &lt;code&gt;&amp;lt;?php auth_redirect(); ?&amp;gt;&lt;/code&gt; to &lt;code&gt;header.php&lt;/code&gt;. But only on the dev site! And be sure to commit your changes so they aren't overwritten on the next deploy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; You should also tell Git to ignore the &lt;code&gt;uploads&lt;/code&gt; directory. Especially if your site is going to have a lot of them. If you bloat your repo too much Github and Bitbucket start restricting your access to it. Plus, it's just good practice to consider media as part of the site content/database. WP Sync DB has a &lt;a href="https://github.com/wp-sync-db/wp-sync-db-media-files" rel="noopener noreferrer"&gt;Media Files add-on&lt;/a&gt; for transferring uploads to and from environments.&lt;/p&gt;




&lt;h4&gt;
  
  
  Related Posts
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://zackphilipps.com/a-front-end-developers-daily-app-stack/" rel="noopener noreferrer"&gt;A Front End Developer’s Daily App Stack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/zackphilipps/a-front-end-developers-sublime-text-setup-temp-slug-48528"&gt;A Front End Developer's Sublime Text Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/zackphilipps/how-i-use-chrome-to-run-a-web-design-business-temp-slug-8442614"&gt;How I Use Chrome to Run a Web Design Business&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>wordpress</category>
      <category>localdev</category>
    </item>
    <item>
      <title>How I Use Chrome to Run a Web Design Business</title>
      <dc:creator>Zack Philipps</dc:creator>
      <pubDate>Sat, 04 Apr 2015 01:28:35 +0000</pubDate>
      <link>https://dev.to/zackphilipps/how-i-use-chrome-to-run-a-web-design-business</link>
      <guid>https://dev.to/zackphilipps/how-i-use-chrome-to-run-a-web-design-business</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F04%2Fgoogle-chrome-2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F04%2Fgoogle-chrome-2.jpg" alt="How I Use Chrome to Run a Web Design Business"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As previously mentioned in &lt;a href="http://zackphilipps.com/a-front-end-developers-daily-app-stack/" rel="noopener noreferrer"&gt;A Front End Developer’s Daily App Stack&lt;/a&gt;, I use Chrome Beta even though I'd like to use Safari on Yosemite because I strongly prefer Chrome's DevTools. I thought it would be fun to write about some of the web apps I use as well as my Chrome extensions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Web Apps
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Most of these are freemium, meaning you can enjoy a majority of the features without having to pay a dime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Asana
&lt;/h3&gt;

&lt;p&gt;At &lt;a href="http://tribeswell.com" rel="noopener noreferrer"&gt;Tribeswell&lt;/a&gt;, we use &lt;a href="http://asana.com" rel="noopener noreferrer"&gt;Asana&lt;/a&gt; for &lt;strong&gt;project management.&lt;/strong&gt; It does a very good job of staying out of our way and keeping us out of email for internal communications. (Well, Slack helps too.)&lt;/p&gt;

&lt;p&gt;What I really like about Asana is the keyboard shortcuts for assigning tasks and giving them due dates. It also lets you choose the view of tasks and projects that makes the most sense for you. Another feature I find myself using constantly is &lt;a href="https://asana.com/guide/help/email/email-to-asana" rel="noopener noreferrer"&gt;emailing tasks to Asana&lt;/a&gt;. Asana will automatically pull all the contents of the email, including attachments, and create a task out of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Toggl
&lt;/h3&gt;

&lt;p&gt;We use &lt;a href="http://toggl.com" rel="noopener noreferrer"&gt;Toggl&lt;/a&gt; for &lt;strong&gt;time tracking.&lt;/strong&gt; It's definitely the simplest and best-looking time tracker I've ever seen. We actually use it for logging employees' hours as well as tracking billable hours for clients. Toggl's beautiful report system makes viewing hours over custom date ranges effortless and even fun.&lt;/p&gt;

&lt;p&gt;Plus, once you install the &lt;a href="https://chrome.google.com/webstore/detail/toggl-button/oejgccbfbmkkpaidnkphaiaecficdnfn?hl=en" rel="noopener noreferrer"&gt;Toggl Button browser extension&lt;/a&gt;, you get these neat little Toggl buttons all over the place. On a task in Asana, an issue in GitHub, a Google Doc or Sheet, I can simply click "Start timer" to start tracking my time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Asana and Toggl are two out of the three &lt;a href="http://www.techrepublic.com/blog/tech-sanity-check/how-to-use-pin-tab-to-organize-your-work-in-google-chrome/" rel="noopener noreferrer"&gt;tabs I always have pinned&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Nusii
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F04%2FScreen-Shot-2015-04-03-at-21-23-53.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F04%2FScreen-Shot-2015-04-03-at-21-23-53.png" alt="How I Use Chrome to Run a Web Design Business"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I use &lt;a href="http://nusii.com/#_l_1c" rel="noopener noreferrer"&gt;Nusii&lt;/a&gt; for &lt;strong&gt;proposals.&lt;/strong&gt; It lets me use templates, and gets even more modular than that by allowing me to create and save reusable sections. The sections can be either text-based or price-based. Nusii is designed so that I can offer my clients tiered pricing options. I can include fixed prices or prices per hour, day, or month. They've also recently added a digital signing feature which is pretty awesome.&lt;/p&gt;

&lt;p&gt;When I'm done writing a proposal – thanks to Nusii it now takes WAY less time – I can send it to the client straight from the app and get a notification email whenever the client views it. The client can then choose (a) pricing option(s) and accept the proposal right in the browser. Don't worry, there's the option to download and print a PDF version if the client so desires. Oh, and both the PDF and the web-based version are &lt;strong&gt;drop dead gorgeous.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Other features include custom branding and color scheme and a custom URL that all of your proposals can be accessed from (ours is &lt;strong&gt;proposals.tribeswell.com&lt;/strong&gt; ).&lt;/p&gt;

&lt;h3&gt;
  
  
  Kashoo
&lt;/h3&gt;

&lt;p&gt;We use &lt;a href="http://kashoo.com" rel="noopener noreferrer"&gt;Kashoo&lt;/a&gt; for &lt;strong&gt;cloud accounting.&lt;/strong&gt; It handles all of our invoices from creation to sendoff to clearance. It also features a very robust reporting system so we can compare profit &amp;amp; loss using custom date ranges. Another thing we constantly do is glance at all of our aging receivables to see which clients have invoices that are still out and how long they've been out.&lt;/p&gt;

&lt;h3&gt;
  
  
  Calendly
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F04%2FScreen-Shot-2015-04-03-at-21-26-07.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F04%2FScreen-Shot-2015-04-03-at-21-26-07.png" alt="How I Use Chrome to Run a Web Design Business"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I use &lt;a href="http://calendly.com" rel="noopener noreferrer"&gt;Calendly&lt;/a&gt; (shoutout to &lt;a href="http://www.marcusblankenship.com/" rel="noopener noreferrer"&gt;Marcus Blankenship&lt;/a&gt;) for &lt;strong&gt;scheduling appointments.&lt;/strong&gt; People who want to meet with me can use my personal link and schedule appointments themselves. This eliminates about ten emails &amp;amp; phone calls back and forth trying to figure out a day and time that works.&lt;/p&gt;

&lt;h3&gt;
  
  
  Buffer
&lt;/h3&gt;

&lt;p&gt;Tribeswell isn't much into the &lt;strong&gt;social media&lt;/strong&gt; game at the moment, but when we are, &lt;a href="https://buffer.com/" rel="noopener noreferrer"&gt;Buffer&lt;/a&gt; is nice because it allows managing our Facebook, LinkedIn, and Twitter accounts from a central location. It also takes care of evenly scheduling posts and automatically... posting... them which is great for us and our followers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Strictly Dev
&lt;/h3&gt;

&lt;p&gt;I'll talk about these more in-depth &lt;a href="http://zackphilipps.com/a-wordpress-development-workflow-for-small-teams-in-2015/" rel="noopener noreferrer"&gt;in another post&lt;/a&gt;, but for now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub&lt;/li&gt;
&lt;li&gt;Bitbucket&lt;/li&gt;
&lt;li&gt;DigitalOcean&lt;/li&gt;
&lt;li&gt;Codeship&lt;/li&gt;
&lt;li&gt;Stack Overflow&lt;/li&gt;
&lt;li&gt;New Relic&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Etc.
&lt;/h3&gt;

&lt;p&gt;Since everyone should be using these, here are some that don't deserve their own sections but rather honorable mentions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All things Google&lt;/li&gt;
&lt;li&gt;My social media inlets of choice: Tumblr, Twitter&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Extensions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shipscope
&lt;/h3&gt;

&lt;p&gt;Shipscope is &lt;a href="https://chrome.google.com/webstore/detail/shipscope/jdedmgopefelimgjceagffkeeiknclhh?hl=en" rel="noopener noreferrer"&gt;CodeShip's browser extension&lt;/a&gt; that shows me a list of all of my projects and their build statuses. I opted out of email or Slack notifications for my builds and decided to use this instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Font Face Ninja
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://chrome.google.com/webstore/detail/fontface-ninja/eljapbgkmlngdpckoiiibecpemleclhh?hl=en-US" rel="noopener noreferrer"&gt;Font Face Ninja&lt;/a&gt; lets me spy on the typography of a web page without having to open up DevTools. Plus, it just looks nice and is fun to use. Who doesn't want a little ninja icon always visible in the top-right corner of their browser window?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; this extension will break a site on very rare occurances.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adblock Plus
&lt;/h3&gt;

&lt;p&gt;If you don't have this, what's wrong with you? &lt;a href="https://chrome.google.com/webstore/detail/adblock-plus/cfhdojbkjhnklbpkdaibdccddilifddb?hl=en-US" rel="noopener noreferrer"&gt;Get it, now!&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  GhostText
&lt;/h3&gt;

&lt;p&gt;My coworker recently alerted me to the existence of this gem. It allows me to press &lt;code&gt;cmd+shift+K&lt;/code&gt; to instantly start using &lt;a href="https://dev.to/zackphilipps/a-front-end-developers-sublime-text-setup-temp-slug-48528"&gt;Sublime Text&lt;/a&gt; instead of whatever shitty &lt;code&gt;textarea&lt;/code&gt; I am currently using to code in (read: WordPress). You just have to have the &lt;a href="https://chrome.google.com/webstore/detail/ghosttext-for-chrome/godiecgffnchndlihlpaajjcplehddca?hl=en" rel="noopener noreferrer"&gt;extension&lt;/a&gt; and the &lt;a href="https://github.com/Cacodaimon/GhostText-for-SublimeText" rel="noopener noreferrer"&gt;package&lt;/a&gt; installed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Minimal New Tab Clock
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F04%2FScreen-Shot-2015-04-03-at-21-27-02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F04%2FScreen-Shot-2015-04-03-at-21-27-02.png" alt="How I Use Chrome to Run a Web Design Business"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are tons of &lt;a href="https://chrome.google.com/webstore/search/new%20tab?hl=en&amp;amp;_category=extensions" rel="noopener noreferrer"&gt;"New Tab" extensions&lt;/a&gt;. I picked &lt;a href="https://chrome.google.com/webstore/detail/minimal-new-tab-clock/impmanfocmgfodfbnhbmkkonnpcogfak?hl=en" rel="noopener noreferrer"&gt;this one&lt;/a&gt; because the analog, minimal look actually calms me down.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I am now using &lt;a href="https://chrome.google.com/webstore/detail/embark-new-tab-page/aeajehgeohhgjbhhbicilpenjfcbfnpg?hl=en" rel="noopener noreferrer"&gt;Embark&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update #2:&lt;/strong&gt; I finally jumped on the bandwagon and started using &lt;a href="https://chrome.google.com/webstore/detail/momentum/laookkfknpbbblfpciffpaejjkokdgca?hl=en" rel="noopener noreferrer"&gt;Momentum&lt;/a&gt;... It's amazing and perfect and all the other new tab extensions suck in comparison... Hope you're happy!&lt;/p&gt;

&lt;h3&gt;
  
  
  Terms of Service; Didn’t Read
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://tosdr.org/" rel="noopener noreferrer"&gt;I simply find this interesting.&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Related Posts
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://zackphilipps.com/a-front-end-developers-daily-app-stack/" rel="noopener noreferrer"&gt;A Front End Developer’s Daily App Stack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/zackphilipps/a-front-end-developers-sublime-text-setup-temp-slug-48528"&gt;A Front End Developer's Sublime Text Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://zackphilipps.com/a-wordpress-development-workflow-for-small-teams-in-2015/" rel="noopener noreferrer"&gt;A WordPress Development Workflow for Small Teams in 2015&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>chrome</category>
      <category>browser</category>
      <category>webdesign</category>
    </item>
    <item>
      <title>A Front End Developer's Sublime Text Setup</title>
      <dc:creator>Zack Philipps</dc:creator>
      <pubDate>Fri, 27 Mar 2015 20:18:46 +0000</pubDate>
      <link>https://dev.to/zackphilipps/a-front-end-developers-sublime-text-setup</link>
      <guid>https://dev.to/zackphilipps/a-front-end-developers-sublime-text-setup</guid>
      <description>&lt;p&gt;This post – as well as my other post &lt;a href="http://zackphilipps.com/a-front-end-developers-daily-app-stack/" rel="noopener noreferrer"&gt;A Front End Developer’s Daily App Stack&lt;/a&gt; – is 100% inspired by &lt;a href="https://medium.com/design-notes/a-designers-sublime-text-setup-e3963f8d79da" rel="noopener noreferrer"&gt;A Designer’s Sublime Text Setup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you're following along, as a prerequisite you should definitely upgrade to &lt;a href="http://www.sublimetext.com/3" rel="noopener noreferrer"&gt;Sublime Text 3&lt;/a&gt; if you haven't already, and likewise &lt;a href="https://packagecontrol.io/installation" rel="noopener noreferrer"&gt;install Package Control&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Theme &amp;amp; Color Scheme
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F03%2FScreen-Shot-2015-03-27-at-12-28-43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fzackphilipps.com%2Fcontent%2Fimages%2F2015%2F03%2FScreen-Shot-2015-03-27-at-12-28-43.png" alt="A Front End Developer's Sublime Text Setup"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Having started with &lt;a href="https://github.com/thinkpixellab/flatland" rel="noopener noreferrer"&gt;Flatland&lt;/a&gt;, I am currently using &lt;a href="https://github.com/jamiewilson/predawn" rel="noopener noreferrer"&gt;Predawn&lt;/a&gt;. I love it so much... It has a color scheme built in, and even its own icon set and dock icon, as well as suggested settings and packages! I owe my entire Sublime setup to Jamie Wilson and &lt;a href="https://github.com/mathiasbynens/dotfiles" rel="noopener noreferrer"&gt;Mathias Bynens&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Key Bindings
&lt;/h3&gt;

&lt;p&gt;Like &lt;a href="https://medium.com/@matejlatin" rel="noopener noreferrer"&gt;Matej Latin&lt;/a&gt;, I had also been using Brackets for a while before I switched to Sublime. I also had a lot of difficulty adjusting to the new keybindings for &lt;em&gt;Duplicate Line&lt;/em&gt; and &lt;em&gt;Delete Line&lt;/em&gt;. To emulate this in Sublime, simply navigate to Preferences &amp;gt; Key Bindings – User and add this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
{ "keys": ["super+d"], "command": "duplicate_line" },
{ "keys": ["super+shift+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However I actually have all of my Sublime preferences synced with my entire development team at work (more on that later – has its pros and cons), and one of them really liked the &lt;em&gt;Quick Add Next&lt;/em&gt; default behavior of &lt;code&gt;command+D&lt;/code&gt;, so I got used to this instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "keys": ["super+alt+d"], "command": "duplicate_line" }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To make that work, I had to go to &lt;em&gt;System Preferences &amp;gt; Keyboard &amp;gt; Shortcuts &amp;gt; Launchpad &amp;amp; Dock&lt;/em&gt; and uncheck the box for &lt;em&gt;Turn Dock Hiding On/Off&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I'm also a huge fan of &lt;a href="http://sublimetext.info/docs/en/extensibility/snippets.html" rel="noopener noreferrer"&gt;snippets&lt;/a&gt;, so I wanted a handy shortcut to pop open a list of snippets. This did the trick:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "keys": ["ctrl+s"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Snippet: "}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also have the package &lt;a href="http://addyosmani.com/blog/fixmyjs/" rel="noopener noreferrer"&gt;FixMyJS&lt;/a&gt; installed, so the shortcut to use that is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "keys": ["alt+super+j"], "command": "fix" }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So to recap, and for the sake of quick updating in the future, my entire keybindings file looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
{ "keys": ["super+shift+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+s"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Snippet: "}},
{ "keys": ["alt+super+j"], "command": "fix" },
{ "keys": ["super+alt+d"], "command": "duplicate_line" },
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Preferences
&lt;/h3&gt;

&lt;p&gt;My preferences are a combination of Mathias's and Jamie's preferences with a few little tweaks of my own. My tweaks are mostly typography-related (I use 14 pt. with a bottom line padding of 4 because I like to be able to see my code), but I also have &lt;code&gt;find_selected_text&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt; (another Brackets-inspo'd behavior). I've also implemented &lt;a href="http://benfrain.com/top-tips-selection-unrelated-front-end-developer-tips" rel="noopener noreferrer"&gt;Ben Frain's top tip to stop hyphens from separating words&lt;/a&gt;. Here's my entire preferences file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
"close_windows_when_empty": false,
"color_scheme": "Packages/Predawn/predawn.tmTheme",
"default_encoding": "UTF-8",
"default_line_ending": "unix",
"detect_indentation": false,
"draw_indent_guides": true,
"draw_minimap_border": true,
"draw_white_space": "all",
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": false,
"file_exclude_patterns":
[
    ".DS_Store",
    "Desktop.ini",
    "*.pyc",
    "._*",
    "Thumbs.db",
    ".Spotlight-V100",
    ".Trashes"
],
"find_selected_text": true,
"folder_exclude_patterns":
[
    ".git",
    "node_modules"
],
"font_size": 14,
"highlight_modified_tabs": true,
"hot_exit": false,
"ignored_packages":
[
    "Vintage"
],
"indent_guide_options":
[
    "draw_active"
],
"line_padding_bottom": 4,
"match_brackets": true,
"match_brackets_angle": true,
"open_files_in_new_window": false,
"overlay_scroll_bars": "enabled",
"remember_open_files": false,
"show_encoding": true,
"show_line_endings": true,
"sidebar_default": true,
"tab_size": 2,
"tabs_small": true,
"theme": "predawn.sublime-theme",
"translate_tabs_to_spaces": false,
"trim_trailing_white_space_on_save": true,
"word_separators": "./\\()\"':,.;&amp;lt;&amp;gt;~!@#$%^&amp;amp;*|+=[]{}`~?",
"word_wrap": true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Packages
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/smilledge/acf-sublime-snippets" rel="noopener noreferrer"&gt;ACF Snippets&lt;/a&gt; – For &lt;a href="http://advancedcustomfields.com" rel="noopener noreferrer"&gt;Advanced Custom Fields for WordPress&lt;/a&gt;. I &amp;lt;3 it. With the baked-in PHP snippet, I can now type &lt;code&gt;php&lt;/code&gt;, tab, &lt;code&gt;ifgf&lt;/code&gt;, tab, and then type in the field name as opposed to typing &lt;code&gt;&amp;lt;?php if(get_field('field_name')): ?&amp;gt;&lt;/code&gt; which is very awkward.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Monnoroch/ColorHighlighter" rel="noopener noreferrer"&gt;Color Highlighter&lt;/a&gt; – Unobtrusively previews hexadecimal color values by underlaying the selected hex codes in different styles.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://emmet.io/" rel="noopener noreferrer"&gt;Emmet&lt;/a&gt; – Another time-saving package, as now I can type &lt;code&gt;!&lt;/code&gt;, &lt;code&gt;tab&lt;/code&gt; as opposed to (along with MANY MANY others):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://addyosmani.com/blog/fixmyjs/" rel="noopener noreferrer"&gt;FixMyJS&lt;/a&gt; – Just click the link and read Addy's post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/jisaacks/GitGutter" rel="noopener noreferrer"&gt;GitGutter&lt;/a&gt; – This is both part of &lt;a href="https://github.com/mathiasbynens/dotfiles" rel="noopener noreferrer"&gt;Mathias's dotfiles&lt;/a&gt; and suggested by Jamie. It's amazing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/daaain/Handlebars" rel="noopener noreferrer"&gt;Handlebars&lt;/a&gt; – Handlebars syntax support.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/enginespot/js-beautify-sublime" rel="noopener noreferrer"&gt;JavaScript Beautify&lt;/a&gt; – Automatically formats my JS just the way I like every time I hit &lt;em&gt;Save.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/csch0/SublimeText-Package-Syncing" rel="noopener noreferrer"&gt;Package Syncing&lt;/a&gt; – Suggested by Matej and &amp;lt;3'd by many. Uses Dropbox to sync your Sublime preferences across devices. This is what we use at work so we all have the same ST3 setup. Referenced in the post about &lt;a href="http://zackphilipps.com/a-front-end-developers-daily-app-stack/" rel="noopener noreferrer"&gt;my daily app stack&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://packagecontrol.io/packages/Sass" rel="noopener noreferrer"&gt;Sass&lt;/a&gt; – Sass syntax support.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/badsyntax/SassBeautify" rel="noopener noreferrer"&gt;SassBeautify&lt;/a&gt; – Automatically formats my SCSS just the way I like every time I hit &lt;em&gt;Save.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/xavi-/sublime-selectuntil" rel="noopener noreferrer"&gt;SelectUntil&lt;/a&gt; – Lets me press &lt;code&gt;cmd+shift+L&lt;/code&gt; to get a cursor on each line I've selected. This way I can bulk edit multiple lines where the characters are all different but the lengths are the same. Useful for editing file/directory structures I've copied from the command line where find &amp;amp; replace just doesn't cut it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/titoBouzout/SideBarEnhancements" rel="noopener noreferrer"&gt;SideBarEnhancements&lt;/a&gt; – Recommended by Jamie and &amp;lt;3'd by many. Lets me do a million things when I right-click files/folders in ST3's sidebar as opposed to virtually nothing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/purplefish32/sublime-text-2-wordpress" rel="noopener noreferrer"&gt;WordPress&lt;/a&gt; – If you work with a lot of WP sites, this is indispensable.&lt;/p&gt;




&lt;h4&gt;
  
  
  Related Posts
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://zackphilipps.com/a-front-end-developers-daily-app-stack/" rel="noopener noreferrer"&gt;A Front End Developer’s Daily App Stack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://zackphilipps.com/a-wordpress-development-workflow-for-small-teams-in-2015/" rel="noopener noreferrer"&gt;A WordPress Development Workflow for Small Teams in 2015&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://zackphilipps.com/how-i-use-chrome-to-run-a-web-design-business/" rel="noopener noreferrer"&gt;How I Use Chrome to Run a Web Design Business&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>sublime</category>
      <category>editor</category>
    </item>
  </channel>
</rss>
