Skip to content

Instantly share code, notes, and snippets.

View mdespuits's full-sized avatar

Matthew Wells mdespuits

View GitHub Profile
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@joelmoss
joelmoss / gist:2470666
Created April 23, 2012 12:37
Capistrano recipe for Puma start/stop/restarts
set :shared_children, shared_children << 'tmp/sockets'
namespace :deploy do
desc "Start the application"
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false
end
desc "Stop the application"
task :stop, :roles => :app, :except => { :no_release => true } do
@mdespuits
mdespuits / basic_postgres_setup.sh
Created May 15, 2012 16:50
mac os x postgres install (homebrew option)
# Access tty to ask for confirmation even if we're in a pipe (thanks Pow)
TTY="/dev/$( ps -p$$ -o tty | tail -1 | awk '{print$1}' )"
read -p "*** Do you want to reinstall the 'pg' gem [y/n]?" REINSTALL_PG < $TTY
if [[ $REINSTALL_PG == "y" ]]; then
gem uninstall pg
gem install pg
fi
# Ask if the user wants to setup the db with a 'root' superuser?
@headius
headius / irb.txt
Created February 12, 2013 21:08
Example of Binding.of_caller in JRuby
ext-jruby-local ~/projects/jruby $ jruby -X-C -S irb
irb(main):001:0> def foo
irb(main):002:1> a = 1
irb(main):003:1> bar
irb(main):004:1> puts a
irb(main):005:1> end
=> nil
irb(main):006:0> def bar
irb(main):007:1> eval 'a = 2', Binding.of_caller(1)
irb(main):008:1> end