Wednesday, May 22, 2013

Google search plugin for terminator

This is going to save me 10 minutes a day.  Props to the developer.

https://github.com/choffee/terminator-plugins

This is a plugin which adds a function to the context menu of terminator (my favorite Linux-based terminal emulator) which will search Google for the selected text.  Before I discovered this, I would select the text, copy it to a browser like Chrome or Firefox, then searched Google.  This is going to make me much more efficient.

Wednesday, January 16, 2013

Capistrano with sudo

Capistrano with sudo

An easy way to execute commands with sudo from within a capistrano job is to add the prefix  #{sudo} to a command within your capistrano task.  For example:

task :make_protected_dir, :roles =>db do
  run "#{sudo} mkdir /root/mydir"
end

Another example:
task :restart_httpd, :roles =>app do
  run "#{sudo} /etc/init.d/httpd restart"
end

Then from the command line, load your file with these entries:

cap -f capfile

Then, execute the commands:

cap make_protected_dir

cap restart_httpd

More info:

https://github.com/capistrano/capistrano/wiki/2.x-DSL-Configuration-Tasks-Task

Tuesday, January 1, 2013

S3 Utility

Here is a great tool for working with Amazon S3.  It even has a wide variety of repos available (easier than compiling from source).  s3cmd is very easy to setup.  It is the easiest to work with of all the S3 tools I have used.