Skip to content

Instantly share code, notes, and snippets.

View gerardc's full-sized avatar

Gerard Cahill gerardc

  • Rent the Runway
  • Galway, Ireland
View GitHub Profile
@gerardc
gerardc / keybase.md
Last active August 8, 2019 14:33
keybase.md

Keybase proof

I hereby claim:

  • I am gerardc on github.
  • I am gerardc (https://keybase.io/gerardc) on keybase.
  • I have a public key ASArhTvaM8CV874qk5i5No0itmxA9Xb8sJubhi39_cBBXwo

To claim this, I am signing this object:

@gerardc
gerardc / jekyll-rack
Created March 19, 2013 11:06
Alternative to `jekyll --server`. Need to run `jekyll --auto` in adjacent terminal for reloading.
require 'bundler/setup'
require 'rack/contrib/try_static'
use Rack::TryStatic, :root => "_site", :urls => %w[/], :try => ['.html', 'index.html', '/index.html']
run Proc.new {|env| [404, {"Content-Type" => "text/plain"}, ["File not found"]]}
@gerardc
gerardc / Cron + RVM
Created June 20, 2011 11:16
Example cron job calling rake from within a rails application running on an RVM ruby
*/5 * * * * /usr/local/rvm/bin/rvm-shell 'ruby-1.9.2-p180' -c 'BUNDLE_GEMFILE=$HOME/www/rails_apps/<APP_NAME>/current/Gemfile RAILS_ENV=production bundle exec rake -f $HOME/www/rails_apps/<APP_NAME>/current/Rakefile <TASK_NAME>' > $HOME/www/rails_apps/<APP_NAME>/current/log/<TASK_NAME>_output.log 2>$HOME/www/rails_apps/<APP_NAME>/current/log/<TASK_NAME>_error.log
@gerardc
gerardc / ctags_vim_paths_gemfile.rb
Created May 30, 2011 14:02 — forked from andyl/ctags_vim_paths_gemfile.rb
Generates Ctags and Vim Paths from Gemfile.lock
#!/usr/bin/ruby
require 'rubygems'
require 'bundler'
=begin
This script was written to incorporate Bundler and Gemfile.lock into
Vim's tag and file-finding tools.
=end
# This code generates ctags. If a Gemfile.lock is found