<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I develop beautiful, compelling 
experiences on the web and beyond.</description><title>Tristan Blease</title><generator>Tumblr (3.0; @tblease)</generator><link>http://tristanblease.com/</link><item><title>Improve vim responsiveness with better timeout settings</title><description>&lt;p&gt;Vim is typically fast, but it can be painfully slow at times, too.&lt;/p&gt;

&lt;p&gt;A great example of this is when you make a block selection, insert/append text, and then hit ESC to apply your action to the rest of your selection. It seems to take forever before you&amp;#8217;re back in normal mode and can see your action applied to the selection.&lt;/p&gt;

&lt;p&gt;After digging into the issue, I learned that it doesn&amp;#8217;t have to be this way.&lt;/p&gt;

&lt;p&gt;Vim has two settings that you let you control timeouts when working with map key sequences and terminal keycodes/escape sequences:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;timeoutlen&lt;/strong&gt; defaults to 1000 and is the delay in milliseconds that vim uses when checking for map key sequences. It&amp;#8217;s also used when checking keycodes if &lt;em&gt;ttimeoutlen&lt;/em&gt; is disabled.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ttimeoutlen&lt;/strong&gt; defaults to -1 (disabled) and is the delay in milliseconds that vim uses when checking for keycodes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Out of the box, my vim was taking a full second to switch between insert and normal mode because &lt;em&gt;ttimeoutlen&lt;/em&gt; was disabled; every hit of the ESC key caused vim to wait the full timeout in anticipation of a possible keycode.&lt;/p&gt;

&lt;p&gt;To get around this I added the following to my vimrc:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;" Adjust keycode timeout length
set ttimeoutlen=100
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Since doing so, I&amp;#8217;ve noticed that vim has been much snappier and even more of a pleasure to work with than usual.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you&amp;#8217;re like me and use vim in tmux, it&amp;#8217;s worth noting that I also had to &lt;a href="http://www.muddygoat.org/articles/vim-in-tmux"&gt;adjust my tmux.conf&lt;/a&gt; to get the timeout settings above working as expected. tmux has its own built-in delay for escape sequences that needs to be tweaked.&lt;/em&gt;&lt;/p&gt;</description><link>http://tristanblease.com/post/39901233601</link><guid>http://tristanblease.com/post/39901233601</guid><pubDate>Sun, 06 Jan 2013 22:55:00 -0500</pubDate><category>vim</category><category>tmux</category></item><item><title>Improving WordPress security through Nginx</title><description>&lt;p&gt;WordPress security has always been a hot topic given its popularity and the large number of amateur developers creating add-ons for it.&lt;/p&gt;

&lt;p&gt;Looking through my nginx error logs for a WordPress site I host, I was disgusted to see that an alarming percentage of requests were clear attempts to hijack the site via insecure plugins and themes.&lt;/p&gt;

&lt;p&gt;Thankfully, every one of these requests ended up serving a 404 page since the site in question only uses a handful of custom-written plugins, but what if we were using published plugins with known security vulnerabilities?&lt;/p&gt;

&lt;p&gt;I&amp;#8217;d rather not find out.&lt;/p&gt;

&lt;p&gt;When placed above your @php location (or other location for processing php files in your nginx.conf), this location directive will stop evil-doers dead in their tracks when they try to directly access any sort of PHP script in the &lt;code&gt;wp-content&lt;/code&gt; directory:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;location ~ ^/wp-content/.+\.php { return 444; }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You&amp;#8217;ve likely seen other 400 HTTP status codes, but the 444 code used here is special. It&amp;#8217;s not an actual HTTP status code, but instead it directs nginx to drop the connection and not send back &lt;em&gt;any&lt;/em&gt; response.&lt;/p&gt;

&lt;p&gt;Previously I had a guard in my @php location to stop visitors from potentially executing PHP scripts in &lt;code&gt;/wp-content/uploads&lt;/code&gt; (returned a 500 response instead), but this updated location directly goes the extra mile by not allowing would-be hijackers the privilege of even receiving a 500 or 404 response.&lt;/p&gt;</description><link>http://tristanblease.com/post/37890437052</link><guid>http://tristanblease.com/post/37890437052</guid><pubDate>Fri, 14 Dec 2012 00:08:00 -0500</pubDate><category>nginx</category><category>wordpress</category></item><item><title>Useful fullscreen mode for iTerm in Lion</title><description>&lt;p&gt;Fullscreen mode in Lion sucks if you use multiple monitors, but it doesn&amp;#8217;t have to suck if you&amp;#8217;re using iTerm2.&lt;/p&gt;

&lt;p&gt;If you disable &amp;#8216;Use Lion-style Fullscreen windows&amp;#8217; under General &amp;gt; Window in iTerm2&amp;#8217;s preferences, iTerm2 will expand to cover the entire desktop area for the monitor it&amp;#8217;s currently displayed on and you&amp;#8217;ll still be able to use your other monitor for other applications/windows.&lt;/p&gt;</description><link>http://tristanblease.com/post/29487298534</link><guid>http://tristanblease.com/post/29487298534</guid><pubDate>Wed, 15 Aug 2012 12:51:41 -0400</pubDate><category>iterm2</category><category>osx</category></item><item><title>Alternate screen mode and annoying scrolling issues in iTerm2</title><description>&lt;p&gt;I recently switched to using vim inside of iTerm instead of running MacVim, and I was immediately annoyed by the strange scrolling behavior that happened while I was using vim.&lt;/p&gt;
&lt;p&gt;Accidental mouse scrolls into the scrollback buffer would reveal strange lines and pieces of the files I was working on. Clearing the scrollback buffer would help for a short period of time, but iTerm was determined to keep logging bits and pieces of my files and status line as I went about using vim.&lt;/p&gt;
&lt;p&gt;After googling around, I learned that the &lt;a href="http://en.wikipedia.org/wiki/Curses_(programming_library)"&gt;curses-based&lt;/a&gt; version of vim runs in alternate screen mode. Alternate screen mode lets an application draw to a different screen so that the state of your shell/prompt is preserved and can be restored when you quit that application. &lt;/p&gt;
&lt;p&gt;This is how vim (and other curses-based applications) takes over your screen and then returns you back to your shell (just as you left it) when you exit the application.&lt;/p&gt;
&lt;p&gt;For whatever reason, iTerm saves lines from alternate screen mode and puts them into the scrollback buffer by default. Luckily, this can be disabled by a quick visit to the terminal tab within your profile settings:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Disabling saving of lines to the scrollback buffer when in alternate screen mode" height="394" src="http://infinitebarrel.com/images/disable-alt-screen-scrollback.png" width="540"/&gt;&lt;/p&gt;
&lt;p&gt;Now, after I enter vim I can immediately clear the scrollback buffer (Menu item &lt;strong&gt;Edit &amp;gt; Clear Scrollback Buffer&lt;/strong&gt; or &lt;strong&gt;Cmd-K&lt;/strong&gt;), issue the vim redraw command in ex mode (&lt;strong&gt;:redraw!&lt;/strong&gt;), and I&amp;#8217;m all set for hours of happy hacking without any side effects from accidental mouse scrolling.&lt;/p&gt;</description><link>http://tristanblease.com/post/26765035942</link><guid>http://tristanblease.com/post/26765035942</guid><pubDate>Sun, 08 Jul 2012 11:27:00 -0400</pubDate><category>vim</category><category>iterm2</category><category>shell</category></item><item><title>The Unix Philosophy</title><description>&lt;a href="http://en.wikipedia.org/wiki/Unix_philosophy"&gt;The Unix Philosophy&lt;/a&gt;: &lt;p&gt;The more I find myself integrating the shell and Unix tools into my workflow, the more drawn I am to the Unix way: &lt;em&gt;“Write programs that do one thing and do it well.”&lt;/em&gt;&lt;/p&gt;</description><link>http://tristanblease.com/post/26435998782</link><guid>http://tristanblease.com/post/26435998782</guid><pubDate>Tue, 03 Jul 2012 15:19:00 -0400</pubDate><category>unix</category><category>shell</category></item><item><title>Shell Arguments</title><description>&lt;a href="http://mywiki.wooledge.org/Arguments"&gt;Shell Arguments&lt;/a&gt;: &lt;p&gt;This in-depth article clarifies how your shell deals with word-splitting, quoting, and expansion. Well worth the read if you do any work in the shell.&lt;/p&gt;</description><link>http://tristanblease.com/post/26209368460</link><guid>http://tristanblease.com/post/26209368460</guid><pubDate>Sat, 30 Jun 2012 09:54:48 -0400</pubDate><category>shell</category><category>bash</category><category>zsh</category></item><item><title>Faster searching in the shell with ack</title><description>&lt;p&gt;You&amp;#8217;re already using &lt;a href="http://betterthangrep.com/"&gt;ack&lt;/a&gt;, right? Great.&lt;/p&gt;
&lt;p&gt;A really simple way to speed up your searching in the shell is to trick out your ackrc file (~/.ackrc). This file takes a list of arguments to ack, which ack will then use as default arguments.&lt;/p&gt;
&lt;p&gt;This means you can update/set the various file types and format the output exactly how you&amp;#8217;d like it to be formatted by default.&lt;/p&gt;
&lt;p&gt;Here are the contents of my ackrc:&lt;/p&gt;
&lt;p&gt;&lt;code&gt; --noheading&lt;br/&gt; --nobreak&lt;br/&gt; --ignore-dir=public/assets&lt;br/&gt; --ignore-dir=public/javascripts/cache&lt;br/&gt; --ignore-dir=db&lt;br/&gt; --ignore-dir=log&lt;br/&gt;--type-set=coffee=.coffee,.cakefile&lt;br/&gt; --type-set=tests=.spec,.feature,.rb&lt;br/&gt; --type-set=ruby=.rb,.rhtml,.rjs,.rxml,.erb,.rake,.haml,.mustache&lt;br/&gt; --type-set=mustache=.mustache&lt;br/&gt; --type-add=css=.sass,.scss,.styl,.less &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Right away you can see I&amp;#8217;ve changed the default output to remove the file heading that gets printed and remove all extra line breaks. This makes it easier to take the output I get from ack I pipe it to other shell utilities as needed. &lt;/p&gt;
&lt;p&gt;If I wanted my heading and line breaks back, I would just run ack with the correct arguments to override my preset defaults.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ack --heading --break "Foo"&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The next set of arguments set folders that I typically don&amp;#8217;t want to ack to search in. Again, I can override these by passing an argument to ack at runtime to unignore the folder:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ack --noignore-dir=log "Foo"&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The last set extends the different filetype groupings ack recognizes and allows me to search faster by specifying the types of files I&amp;#8217;m interested in:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ack --coffee --js "Foo"&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Customizing your ackrc may take about as long as it took for you to read this post, but you&amp;#8217;ll immediately start reaping the benefits. For a full list of arguments that ack supports, you can run &lt;code&gt;ack --help&lt;/code&gt; or &lt;a href="http://betterthangrep.com/documentation/"&gt;review the ack documentation online&lt;/a&gt;.&lt;/p&gt;</description><link>http://tristanblease.com/post/26147835960</link><guid>http://tristanblease.com/post/26147835960</guid><pubDate>Fri, 29 Jun 2012 12:33:00 -0400</pubDate><category>ack</category><category>shell</category></item><item><title>I &lt;3 Internet Explorer</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_m68hjgcIvu1rz6h4uo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I &lt;3 Internet Explorer&lt;/p&gt;</description><link>http://tristanblease.com/post/25934141098</link><guid>http://tristanblease.com/post/25934141098</guid><pubDate>Tue, 26 Jun 2012 12:52:28 -0400</pubDate></item><item><title>CoffeeScript is JavaScript</title><description>&lt;a href="https://github.com/raganwald/homoiconic/blob/master/2011/12/jargon.md"&gt;CoffeeScript is JavaScript&lt;/a&gt;: &lt;p&gt;I really, really, really hate hearing excuses from other developers about why they are unable to learn or use CoffeeScript. This article, &lt;em&gt;CoffeeScript is not a language worth learning&lt;/em&gt;, does a great job of putting the CoffeeScript vs JavaScript issue into perspective. If you haven’t read it yet, you absolutely need to stop what you’re doing and read it now.&lt;/p&gt;
&lt;p&gt;The bottom line? CoffeeScript is awesome, so stop making excuses and start making great software instead.&lt;/p&gt;</description><link>http://tristanblease.com/post/25752568947</link><guid>http://tristanblease.com/post/25752568947</guid><pubDate>Sat, 23 Jun 2012 21:55:00 -0400</pubDate><category>coffeescript</category><category>javascript</category></item><item><title>Vim Clutch</title><description>&lt;p&gt;&lt;p class="p1"&gt;Earlier today a link was making rounds of how &lt;a href="https://github.com/alevchuk/vim-clutch"&gt;&lt;span class="s1"&gt;Aleksandr Levchuk modified a USB pedal to act as a toggle for Vim&amp;#8217;s insert mode&lt;/span&gt;&lt;/a&gt;. Press the pedal to enter insert mode, and depress it to return to normal mode.&lt;/p&gt;
&lt;p class="p1"&gt;When I think about all of the different types of inputs that we use to operate other technology (for example, driving a car), it surprises me that today was the first time I&amp;#8217;ve read about anyone attempting to use alternative inputs beyond a keyboard and mouse to improve their coding efficiency.&lt;/p&gt;
&lt;p class="p1"&gt;I&amp;#8217;m not sure how useful the Vim Clutch really is in practice, but it certainly sounds like a fantastic idea.&lt;/p&gt;&lt;/p&gt;</description><link>http://tristanblease.com/post/25612927478</link><guid>http://tristanblease.com/post/25612927478</guid><pubDate>Thu, 21 Jun 2012 20:58:00 -0400</pubDate><category>vim</category></item><item><title>Aliases on the shell</title><description>&lt;p&gt;The easiest way to speed up your workflow in your shell is to create aliases for your most frequently used applications and their configuration settings. If you use zsh, these aliases can go into &lt;code&gt;~/.zshrc&lt;/code&gt;, but if you use bash they should go in &lt;code&gt;~/.bash_profile&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A few sample aliases from my for git:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;alias g='git'&lt;br/&gt;alias ga='git add'&lt;br/&gt;alias gc='git commit -m'&lt;br/&gt;alias gac='git add -u &amp;amp;&amp;amp; git commit -m "Auto commit"'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, when I&amp;#8217;m on my prompt, the aliases will be expanded by my shell after I hit return to execute the command.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ gc 'This is my commit message' &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Expands to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ git commit -m 'This is my commit message'&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Set Default Options&lt;/h3&gt;
&lt;p&gt;You can also use this to set default options for commonly used programs.&lt;/p&gt;
&lt;p&gt;For example, let&amp;#8217;s say you want to have &lt;code&gt;ls&lt;/code&gt; display its output in list mode with color on OSX. I can just set up an alias like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;alias ls='ls -lG'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And now when I invoke &lt;code&gt;ls&lt;/code&gt; on my prompt, it will automatically expand it as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ls -a /path/to/foo&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Expands to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ls -lG -a /path/to/foo&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;More Examples&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;alias p='pushd'&lt;br/&gt;alias o='popd'&lt;br/&gt;alias s='cd -'&lt;br/&gt;alias rcedit='mvim -f ~/.zshrc &amp;amp;&amp;amp; source .zshrc'&lt;br/&gt;alias hostedit='sudo mvim -f /etc/hosts &amp;amp;&amp;amp; dscacheutil -flushcache'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Share your custom shell aliases and tips in the comments.&lt;/p&gt;</description><link>http://tristanblease.com/post/25577798072</link><guid>http://tristanblease.com/post/25577798072</guid><pubDate>Thu, 21 Jun 2012 11:33:00 -0400</pubDate><category>shell</category><category>bash</category><category>zsh</category><category>git</category><category>tips</category></item><item><title>Git Fresh</title><description>&lt;p&gt;Here is a quick script that lets you easily check the freshness of your git repository branches.&lt;/p&gt;
&lt;p&gt;Place this script somewhere in your PATH and make it executable. This script can then be ran within any git repository by calling `git fresh` within the repository.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/2778445"&gt;View on GitHub&lt;/a&gt;&lt;/p&gt;</description><link>http://tristanblease.com/post/25489300287</link><guid>http://tristanblease.com/post/25489300287</guid><pubDate>Wed, 20 Jun 2012 01:42:00 -0400</pubDate><category>git</category><category>shell</category><category>bash</category></item><item><title>To the cloud</title><description>&lt;p&gt;&lt;p class="p1"&gt;Last weekend I decided to decouple my development environment from my local machine and move it to an EC2 instance in the cloud. Now, I can work on my projects on any computer anywhere as long as a computer has access to the Internet and a terminal emulator. &lt;/p&gt;
&lt;p class="p1"&gt;For text editing I&amp;#8217;m using Vim - I&amp;#8217;ve been using this fantastic editor on my Mac for a while, so choosing this as my editor in the cloud was a no brainer. With my vimrc file in place, it&amp;#8217;s just like editing files locally except I now edit files over SSH.&lt;/p&gt;
&lt;p class="p1"&gt;To handle screen multiplexing, I&amp;#8217;m using tmux, and I&amp;#8217;m specifically using the version that&amp;#8217;s compiled with extra support for iTerm2. This makes screen management a little easier when I&amp;#8217;m logged in via my own machines, but ensures that I can log in from anywhere. &lt;/p&gt;
&lt;p class="p1"&gt;I&amp;#8217;m not running any major services (nginx/mysql/postgres/etc) in my environment yet, but I do have ruby and node installed for the sake of being able to spin up a project-based application server as needed.&lt;/p&gt;
&lt;p class="p1"&gt;If I do end up starting a heavier duty project (one that requires a dev db or real web server), I can always set up a file watcher to rsync my changes to another server.&lt;/p&gt;
&lt;p class="p1"&gt;Looking forward to seeing how well this works over the next few weeks. Details to follow&amp;#8230;&lt;/p&gt;&lt;/p&gt;</description><link>http://tristanblease.com/post/25485469480</link><guid>http://tristanblease.com/post/25485469480</guid><pubDate>Tue, 19 Jun 2012 00:00:00 -0400</pubDate><category>vim</category><category>ec2</category><category>tmux</category><category>ssh</category></item><item><title>On spending time to save time</title><description>&lt;p&gt;I&amp;#8217;m in an unfortunate position where I get to slice up PSDs and create &lt;a href="http://www.spam.com/"&gt;single-use HTML emails for marketing purposes&lt;/a&gt; at least twice a week. It&amp;#8217;s work, but it&amp;#8217;s by no means interesting or fun.&lt;/p&gt;
&lt;p&gt;Like most folks, I&amp;#8217;ve nailed down a process derived from years of battling with the major email clients (my favorite client being Outlook 2007/2010). My process works. On average, it takes me an hour per email to go from PSD to a mashup of JPGs and HTML markup that displays correctly in most clients.&lt;/p&gt;
&lt;p&gt;Spending an hour per email isn&amp;#8217;t that bad, but why spend two hours a week pushing pixels when you can be spending that time doing &lt;em&gt;anything else?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Not wanting to waste another minute on HTML email, a few weeks ago I spent three hours coding up a quick and dirty Node app that uses a blend of CoffeeScript and Eco to quickly generate all of the needed markup for my emails from just a few lines of code. How few? Depends on how you slice up that PSD, but it&amp;#8217;s possible to generate full emails in 30 lines of code or less.&lt;/p&gt;
&lt;p&gt;You just pass the app this file and in return you get a new file chock full of ugly, disgusting HTML markup that works across most email clients without further adjustment or tweaking. Hooray!&lt;/p&gt;
&lt;p&gt;So far, I&amp;#8217;ve only been able to use my new tool a handful of times, but now I&amp;#8217;m finding that I can go from PSD to HTML in 15-20 minutes. In the amount of time it used to take me to one email, I&amp;#8217;m doing 3-4 of them.&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s an extra 40-45 minutes per email per week, &lt;em&gt;or an extra 48–72 hours a year&lt;/em&gt;, that I get to spend having fun by refining this new app or coming up with new ways to make my other processes more efficient.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll take it.&lt;/p&gt;</description><link>http://tristanblease.com/post/25486103093</link><guid>http://tristanblease.com/post/25486103093</guid><pubDate>Sun, 01 Jan 2012 00:00:00 -0500</pubDate></item><item><title>Sanity check: how do you organize your web projects?</title><description>&lt;p&gt;This past week, I was handed a Joomla site developed by someone else, and I was asked to clean up and update a few sections on the site. At first glance, I just about died. The file system was a mess—multiple Joomla installs, assets spread across different directories, everything out of place—and the internal structure (database) was no better. We tracked down the correct files using WebKit&amp;#8217;s developer tools, but we could have saved significant time if the site was better organized.&lt;/p&gt;
&lt;p&gt;Everyone already knows that keeping your projects well-organized streamlines development. makes collaborating with others easier, and allows you to keep your sanity should you have to come back to a project weeks, months, or even years, after completing it. Right?&lt;/p&gt;
&lt;p&gt;How do you keep your project folders organized when creating web sites/apps? Read on for my organization strategy, and then leave yours in the comments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Organization at a glance&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To get started, here&amp;#8217;s how I organize mine:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/ &lt;br/&gt;/client/project &lt;br/&gt;/client/project/.git &lt;br/&gt;/client/project/app &lt;br/&gt;/client/project/config &lt;br/&gt;/client/project/export &lt;br/&gt;/client/project/front_end &lt;br/&gt;/client/project/logs &lt;br/&gt;/client/project/public_html &lt;br/&gt;/client/project/scripts &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Getting into the nitty-gritty&amp;#8230;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client, /client/project &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each client gets it&amp;#8217;s own directory on my server, and each project gets its own directory underneath the client its specifically built for.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/project/.git &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Version control. Everyone should use some flavor of version control. It doesn&amp;#8217;t matter whether you use git, subversion, mercurial&amp;#8230; just use it and stop complaining about having to learn something new. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/project/app &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For custom PHP projects, CodeIgniter apps, and ExpressionEngine installs, I put all of my app logic into subdirectories contained within the app directory; keeping this data out of the docroot helps keep me organized and gives an extra layer of security.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/project/config &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I use this directory to keep all of my needed configuration files for any scripts, application settings, and even hosting configs (if I&amp;#8217;m running nginx, I&amp;#8217;ll drop a symlink to this host&amp;#8217;s specific configuration file.) Again, config files kept away from the docroot is a nice boost for security.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/project/export &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If I&amp;#8217;m exporting data out of my web app as a file, I&amp;#8217;ll usually export it to this directory. When a user needs to download it from the site, I&amp;#8217;ll have PHP fetch the file and return it. Keeps export files safe from prying eyes and allows me to use whatever authentication scheme I&amp;#8217;m using to allow/deny access to these files.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/project/front_end &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Usually, I&amp;#8217;ll build the project&amp;#8217;s front end code out separately from the app logic. If so, I keep those original files here and stashed in the repository for easy reference later on.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/project/logs &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Application specific logs go here as well as symlinks to any domain-specific host access and error logs.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/project/public_html &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My docroot for each project. I try to limit files going in here to only what&amp;#8217;s needed (final front end assets like js/css/images, static html, etc.).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/client/project/scripts &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Deployment scripts, front-end testing JS (for large forms that require repetitive data entry).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;That&amp;#8217;s how I do it. Et tu?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Do you use a similar strategy? Maybe something completely different? Leave your strategies and ideas on organization in the comments, and let&amp;#8217;s get organized.&lt;/p&gt;</description><link>http://tristanblease.com/post/25486255252</link><guid>http://tristanblease.com/post/25486255252</guid><pubDate>Sat, 05 Feb 2011 00:00:00 -0500</pubDate></item><item><title>Generating a pubkey on Mac OS X</title><description>&lt;p&gt;Read on for a quick tutorial on how to generate an SSH pubkey using Mac OS X. This should work for just about any version of Mac OS X and be useful to create public keys for services like Codebase.&lt;/p&gt;
&lt;p&gt;Go into the Utilities folder in your &lt;em&gt;Applications&lt;/em&gt; folder and open &lt;em&gt;Terminal.app&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;When the prompt appears, enter &amp;#8216;ssh-keygen&amp;#8217; and hit return. This will start the key generator.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ssh-keygen &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first question the key generator will ask is where to save the key to. Just hit return to save the key in it&amp;#8217;s default location&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Enter file in which to save the key (/Users/tristan/.ssh/id_rsa): &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, enter a passphrase to secure your key. It will ask you to confirm your passphrase. You can leave this blank, requiring no passphrase, but it is recommended to secure your key. When you use a passphrase, the system will ask you for that passphrase whenever the key is used for the first time after you&amp;#8217;ve logged into your computer.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Enter passphrase (empty for no passphrase): &lt;br/&gt;Enter same passphrase again: &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, you&amp;#8217;ll be told where your key was saved and where your public key was saved. Select and copy the public key path. You&amp;#8217;ll need that in a second. The path should look something like /Users/tristan/.ssh/id_rsa.pub.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Your identification has been saved in /Users/tristan/.ssh/id_rsa &lt;br/&gt;Your public key has been saved in /Users/tristan/.ssh/id_rsa.pub &lt;br/&gt;The key fingerprint is: &lt;br/&gt;13:cc:de:c8:e7:88:4d:62:3f:57:85:5d:f5:88:33:97&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, type &amp;#8216;cat &amp;#8217; into the terminal, paste the path to your public key, and hit return. This will output your public key which you can then use elsewhere (like on Codebase)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cat /Users/tristan/.ssh/id_rsa.pub &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once you&amp;#8217;ve done this, your public key will be output and look similar to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ssh-rsa U2FsdGVkX1+VGwbGhYieyuhW+H0QD85yK3/wPCQfiXHLRtGt00AttZH N3SdjKFxjK3LsZlBGsve+aX7urQF23LKDM5esPzS7zFo75qSo6XNwPQYcBbpiRH xbXOZ+fPLoKjqYWvDEWs+RNMGs7QkQv+Xt096V/di3j48wZyRSStTGWBkEPRceR WBB6tSbKd48QNdbsZK1LVkiepw8dWBQNI8wuIEiWDe/TKlHaWCSOftRwQijC/qz GIwzBW0MojOR6j4aJU/rWzijFGw== tristan@24-107-186-239 &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can copy and paste this public key as needed, and it will always be stored at the path where you generated it at (usually &lt;em&gt;/Users/yourusername/.ssh/&lt;/em&gt;). Just make sure you&amp;#8217;re always and only using your public key (id_rsa.pub) and not the private key that was generated (id_rsa).&lt;/p&gt;</description><link>http://tristanblease.com/post/25486336649</link><guid>http://tristanblease.com/post/25486336649</guid><pubDate>Mon, 23 Aug 2010 00:00:00 -0400</pubDate><category>pubkey</category><category>ssh</category><category>mac osx</category></item><item><title>iPad First Impressions</title><description>&lt;p&gt;I knew immediately that I was going to get an iPad after Apple made the announcement, but I didn&amp;#8217;t plan to buy one on launch day. Originally, I had planned to hold out for the 3G version. After talking it over with Clay on Friday night, I came to the conclusion that the extra $130 and $15/month contract wouldn&amp;#8217;t be worth the ten minutes a month I&amp;#8217;d actually spend using the 3G service. I went to bed early that night, but still had no intention of waking up early the next morning to wait in line.&lt;/p&gt;
&lt;p&gt;Then Saturday morning came.&lt;/p&gt;
&lt;p&gt;I woke up at precisely 6:30am. Checked Twitter. Saw a few tweets describing that only a handful of people were in line at the West County Mall Apple Store. By 7:00am, I was in that line. The store opened at 9:00am, and soon after, I was on my way home with 16GB iPad and accessories in hand.&lt;/p&gt;
&lt;p&gt;Unboxing and activating the device was simple. After peeling off the plastic wrap and plugging into iTunes I was ready to go.&lt;/p&gt;
&lt;p&gt;Having seen most of the first-party apps already, I immediately jumped into the App store to see what was available. Similar to the iPhone, the iPad is only as good as the apps it runs, right? I downloaded apps across almost every category, but I especially wanted to check out the journalism apps to see how they extended their content to the platform.&lt;/p&gt;
&lt;p&gt;While some apps seemed to be just resized versions of their iPhone cousins, others make fantastic use of the new, larger screen format. A few that come to mind include Evernote, Square, Twitteriffic, and Epicurious.&lt;/p&gt;
&lt;p&gt;I was very disappointed in the few journalism apps I played with. While they all do a great job of bringing their content to the small screen, they all seem to fall short in terms of engagement. None of the apps I tested let you view or leave comments (a big miss as far as I am concerned), and the most interactivity I saw in their content came from the embedded ads. Hopefully, those are things that will be addressed as time goes on.&lt;/p&gt;
&lt;p&gt;Overall, I&amp;#8217;m impressed with the iPad. Clay is going to get one when the 3G version comes out at the end of the month, and by then I&amp;#8217;m sure were going to start seeing a lot of really great apps coming out in the App store. Can&amp;#8217;t wait.&lt;/p&gt;
&lt;p&gt;For those of you who were also early adopters, I&amp;#8217;m curious to hear your opinions on the iPad and the apps that made it in time for launch day. Was it good for you, too?&lt;/p&gt;</description><link>http://tristanblease.com/post/25486389213</link><guid>http://tristanblease.com/post/25486389213</guid><pubDate>Mon, 05 Apr 2010 00:00:00 -0400</pubDate><category>ipad</category><category>apple</category><category>review</category></item></channel></rss>
