Archive for the “linux” category
Quick *nix shadow passwords with Ruby
by Kenneth Kalmer on May 1, 2009
Just thought I’d share this one to boost the available online information. Using String#crypt and man crypt you’ll come up with something similar to the gist below (extract from a project I’m busy working on). module Linux class User class (…)
Pluck out an old revision of a file with git show
by Kenneth Kalmer on March 20, 2009
I was busy merging work back and forth between topic branches today and by accident miss-merged a 700-line spec. Everything else was fine (or so I hope) except this one file. I couldn’t use git revert, since that would mean (…)
Clear the log files of all your rails projects
by Kenneth Kalmer on November 21, 2008
I hit a barrier last night where my virtual machine I use for Rails development ran out of space. I quickly checked around and saw my current Rails project had 800MB in log files (thanks autospec). So I decided to (…)
Postfix log grep gist
by Kenneth Kalmer on October 23, 2008
Just a quickie to tell you about my (first) latest gist: http://gist.github.com/19021 Basically search through the postfix maillog for a pattern, extract the postfix message id from each matched line, and then search through the log file for each corresponding (…)