This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install | |
| curl http://npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Delivery < ActiveRecord::Base | |
| belongs_to :deliverable, :polymorphic => true | |
| belongs_to :receivable, :polymorphic => true | |
| has_many :delivery_impressions | |
| has_many :users, :through => :delivery_impressions | |
| belongs_to :sender, :class_name => 'User', :foreign_key => :sender_id | |
| end | |
| class DeliveryImpression < ActiveRecord::Base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set :rails_env, :production | |
| set :unicorn_binary, "/usr/bin/unicorn" | |
| set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
| set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
| namespace :deploy do | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D" | |
| end | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {":(":{"code":":(","description":"frown","image":"http://sae.tweek.us/static/images/emoticons/frown.gif","height":15,"width":15,"added":1255900959},":)":{"code":":)","description":"smile","image":"http://sae.tweek.us/static/images/emoticons/smile.gif","height":15,"width":15,"added":1255900959},":11tea:":{"code":":11tea:","description":"11:00 drink tea every day","image":"http://sae.tweek.us/static/images/emoticons/emot-11tea.gif","height":25,"width":32,"added":1255900960},":3:":{"code":":3:","description":"kitty face","image":"http://sae.tweek.us/static/images/emoticons/emot-3.gif","height":18,"width":15,"added":1255900960},":a2m:":{"code":":a2m:","description":"Ass to Mouth","image":"http://sae.tweek.us/static/images/emoticons/emot-a2m.gif","height":19,"width":40,"added":1255900960},":aaa:":{"code":":aaa:","description":"my mouth is opening oh no","image":"http://sae.tweek.us/static/images/emoticons/emot-aaa.gif","height":15,"width":15,"added":1255900960},":aaaaa:":{"code":":aaaaa:","description":"AAAAAAHHHH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| after_create :destroy_orphan | |
| def destroy_orphan | |
| destroy if state == "cart" | |
| end | |
| handle_asynchronously :destroy_orphan, :run_at => Proc.new { 48.hours.from_now } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bunny' | |
| b = Bunny.new(:logging => true) | |
| b.start | |
| exchange = b.exchange('hello_reddirt', :type => :fanout) | |
| q = b.queue('my_queue') | |
| q.bind(exchange) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript | |
| powered JS and SASS powered CSS with YUI compression all via the magic of rack. | |
| This stuff will be native in Rails 3.1 and the layout of the files on the | |
| filesystem will be different but this guide will get you working with it | |
| while we wait for all that to finalize. | |
| Ignore the number prefixes on each file. This is just to ensure proper order in the Gist. | |
| It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Blame() | |
| let g:old_ft=&ft | |
| let g:old_fname=expand('%') | |
| vnew | |
| exec "0r!git blame " . g:old_fname | |
| exec "set ft=" . g:old_ft | |
| normal! zt | |
| endfunction | |
| command! -nargs=0 Blame call Blame() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait Item { | |
| val weight: Int | |
| val description: String | |
| val name: String | |
| } | |
| class Action |
OlderNewer