Skip to content

Instantly share code, notes, and snippets.

create_table :users, id: false do |t|
t.uuid :id, primary: true, null: false
# ...
end
@ijonas
ijonas / chef_solo_bootstrap.sh
Last active October 6, 2015 08:48 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
sudo apt-get -y update
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p362.tar.gz
tar -xvzf ruby-1.9.3-p362.tar.gz
cd ruby-1.9.3-p362/
./configure --prefix=/usr/local
make
sudo make install
@jbgo
jbgo / render-markdown.md
Created June 19, 2012 15:28
Render markdown READMEs on the fly

This is my new favorite thing to do when I want to read a README file written in markdown. This assumes you are macosx and have the redcarpet gem installed.

alias readme='redcarpet README.md > readme.html; open readme.html'
readme
@bluemont
bluemont / app_commentary.md
Last active October 5, 2015 21:28
App Commentary

App Commentary

This is mostly a list of Mac applications, but I've included a few Web apps as well.

Every-Day Awesomeness

Alfred : Useful Application Launcher. (When Quicksilver died I switched to Alfred.)

Divvy : Grid-Based Window Manager.

@rmoriz
rmoriz / Gemfile
Last active February 7, 2020 12:30
UUID primary keys in Rails 3
# Gemfile
gem 'uuidtools'
@brettbuddin
brettbuddin / application_job.rb
Created April 23, 2010 16:08
I needed to assign priority dynamically (at the time the job is queued up) with Resque.
class ApplicationJob
def self.set_priority(queue, priority)
if [:high, :medium, :low].include?(priority)
self.instance_eval do
@queue = "#{queue}_#{priority}".to_sym
end
end
end
end