iTerm2 Broadcast Input

So my favorite console on OS X is iTerm2. When I’m working with multiple servers, one of the most useful features is “Broadcast Input” (BI).

BI lets you type into one terminal session, but send those keystrokes to more than one session. This can be all of the tabs in the iTerm window, all of the panels in one tab, or some of the panels across multiple tabs. This is both a very powerful feature, in that it can allow you to configure many servers at the same time, and very dangerous in that it can allow you to inadvertently destroy many servers at the same time.

With great power… Moving on.

Diff Two Files on Different Servers

I recently had the need to diff two files, each on a different server. I was checking to make sure that both files ( server config files ) were in sync. I really didn’t want to eye-ball it, and copying the files to my local machine to run Kaleidoscope on them didn’t sound appealing, either. Vim to the rescue!

1
vimdiff  scp://<IP>//path/to/file1  scp://<IP>//path/to/file2

And in several seconds, I was presented with a side-by-side diff in my terminal. Easy-Peasy.

Hope this help!

/korishev

Overriding Mail Configs in Rails 3

When I am developing a rails app, and I need to work with email portions, I don’t like having to depend on remote mailers to eventually deliver the mail to my inbox, and I don’t really like the idea of installing a mail server locally on my laptop, just to handle some mail testing.

I found an alternative to either of those, called MockSMTP.app. SMTP is the acronym for “Simple Mail Transport Protocol,” and is the language that email servers speak to each other to move messages across the Internet. MockSMTP is an OS X app (I’m sure similar products exist elsewhere) that pretends to be an smtp server for the sole purpose of catching outgoing mail and displaying the contents to you. This works great in practice, the app is easy to set up, and handles html email with no problems. There is only one drawback, that ends up causing some minor hassles.

iTerm2 Default Window Arrangement

I’m an avid user of iTerm2, mainly because I’m an old linux geek, and the Terminal.app that comes with OSX is a raging piece of junk. God how I miss kterm sometimes. But iTerm2 is a really great replacement for kterm.

The project itself is under heavy development, and is continually being updated. The recent activity in tmux integration alone is awesome all by itself, but the constant upgrades come at some cost.

Using Sudo With Rsync

So today I was presented with a problem. I needed to get a set of files copied from one machine to another with their permissions intact, but the were owned by root. I reached for my trusty rsync, and realized I didn’t have a way to set root perms on the remote machine.

Parallel Processing With Xargs

OK. So I found a nifty trick with the venerable unix util xargs. If you aren’t familiar, xargs allows you overcome a limit in most shells, where the shell will only allow you to send a certain number of arguments to an application. Xargs can collect an arbitrary number of arguments from stdin and pass them to your application a certain number (5000 by default) at a time, over and over until all of the arguments are used up.

Global Day of Code Retreat 2011

Yesterday I participated in the Dallas gathering of the Global Day of Code Retreat. Corey Haines (@coreyhaines) has been leading free Code Retreats for a while now, where programmers of all languages and skill levels can come together for a full day of intentional practice. Read more about it at coderetreat.org, you’ll thank me.

Vim Resources for Programmers

I’ve been a vim user since my first linux install in 1995. I used vim as my go-to editor both as a systems administrator and programmer, but in a limited capacity. I knew enough to get around, do some simple substitutions and searches but I never really mastered it.

DFW Big Data Does Cassandra

The latest DFW Big Data meeting showcased Cassandra, with a presentation by Tyler Hobbs, from DataStax. Tyler had to run off to catch a plane, so the Q&A was handled by Eric Evans from Acunu.

Initial Octopress Learnin’

This is my first post. I think I like this stuff.

I cloned the octopress dir, tweaked a bit, created a new heroku app, and BAMMO! I’ve got a blog. Again. With 100% less hassle.

And it is all static. Generated from scratch. There is a subtle warm and fuzzy in that.

So… Keep your eye on this space, I’ve got some really crazy ideas rolling around in my brain, and sooner or later, they are going to escape like that creature in that sci-fi movie you love.

/Korishev