January 2013
1 post
2 tags
Improve vim responsiveness with better timeout...
Vim is typically fast, but it can be painfully slow at times, too.
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’re back in normal mode and can see your action applied to the selection.
After digging into the issue, I learned that it doesn’t...
December 2012
1 post
2 tags
Improving WordPress security through Nginx
WordPress security has always been a hot topic given its popularity and the large number of amateur developers creating add-ons for it.
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.
Thankfully, every one of these requests ended up serving a...
August 2012
1 post
2 tags
Useful fullscreen mode for iTerm in Lion
Fullscreen mode in Lion sucks if you use multiple monitors, but it doesn’t have to suck if you’re using iTerm2.
If you disable ‘Use Lion-style Fullscreen windows’ under General > Window in iTerm2’s preferences, iTerm2 will expand to cover the entire desktop area for the monitor it’s currently displayed on and you’ll still be able to use your other...
July 2012
2 posts
3 tags
Alternate screen mode and annoying scrolling...
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.
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...
2 tags
The Unix Philosophy →
The more I find myself integrating the shell and Unix tools into my workflow, the more drawn I am to the Unix way: “Write programs that do one thing and do it well.”
June 2012
8 posts
3 tags
Shell Arguments →
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.
2 tags
Faster searching in the shell with ack
You’re already using ack, right? Great.
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.
This means you can update/set the various file types and format the output exactly how you’d like it to be formatted by default.
Here are the contents...
2 tags
CoffeeScript is JavaScript →
I really, really, really hate hearing excuses from other developers about why they are unable to learn or use CoffeeScript. This article, CoffeeScript is not a language worth learning, 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.
The bottom line?...
1 tag
Vim Clutch
Earlier today a link was making rounds of how Aleksandr Levchuk modified a USB pedal to act as a toggle for Vim’s insert mode. Press the pedal to enter insert mode, and depress it to return to normal mode.
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’ve read...
5 tags
Aliases on the shell
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 ~/.zshrc, but if you use bash they should go in ~/.bash_profile.
A few sample aliases from my for git:
alias g='git' alias ga='git add' alias gc='git commit -m' alias gac='git add -u && git...
3 tags
Git Fresh
Here is a quick script that lets you easily check the freshness of your git repository branches.
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.
View on GitHub
4 tags
To the cloud
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.
For text editing I’m using Vim - I’ve been using this fantastic editor on my Mac for a while, so choosing this as my editor in...
January 2012
1 post
On spending time to save time
I’m in an unfortunate position where I get to slice up PSDs and create single-use HTML emails for marketing purposes at least twice a week. It’s work, but it’s by no means interesting or fun.
Like most folks, I’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...
February 2011
1 post
Sanity check: how do you organize your web...
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...
August 2010
1 post
3 tags
Generating a pubkey on Mac OS X
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.
Go into the Utilities folder in your Applications folder and open Terminal.app.
When the prompt appears, enter ‘ssh-keygen’ and hit return. This will start the key generator.
$ ssh-keygen...
April 2010
1 post
3 tags
iPad First Impressions
I knew immediately that I was going to get an iPad after Apple made the announcement, but I didn’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’t be worth the ten minutes a month I’d actually spend using the 3G...