Skip to content

Instantly share code, notes, and snippets.

It's Time to Repay Your Debt

Windy City Rails

September 11, 2010

About the Speaker

Kevin W. Gisi

Intridea

Introduction to Open Source

Twin Cities Code Camp

October 9-10, 2010

About the Speaker

Kevin W. Gisi

Intridea

Minimalist Development: Doing More With Less

Twin Cities Code Camp

October 9-10, 2010

About the Speaker

Kevin W. Gisi

Intridea

@gisikw
gisikw / gist:631414
Created October 17, 2010 22:58
early_tag.sh
# Whoops, tagged 'rumble10' early?
# No problem, just delete that tag and retag using these steps:
# (just be sure your final tag is tagged before the 48 hours are up)
# Remove the 'rumble10' tag locally, and on GitHub
git tag -d rumble10
git push origin :refs/tags/rumble10
# Create the tag and push it to GitHub
git tag -a rumble10 -m 'Tagging final release'
class CreateMedications < ActiveRecord::Migration
def self.up
create_table :medications do |t|
t.string :name
t.string :prescriber
t.date :dispense_date
t.integer :quantity
t.integer :days_supply
t.boolean :imported, :default => false
t.boolean :stopped, :default => false
class Outlay < ActiveRecord::Base
def self.budget(scopes = {}, pivot_value = nil)
pivot_value ||= "top_10_competitors"
projection_value = {}.tap do |projection|
Outlay.pivot_values(pivot_value, scopes).each do |pivot|
projection[pivot] = {}
pivot_scopes = ({(pivot_value=="top_10_competitors" ? "contractor" : pivot_value) => pivot}.merge(scopes))
@gisikw
gisikw / gist:1010670
Created June 6, 2011 17:23
Arcane DPS Macro
#showtooltip Arcane Blast
/cast Presence of Mind
/cast Arcane Power
/use 13
/use 14
/cast [nomod:alt] Arcane Blast
/cast [mod:alt] Arcane Missiles
/run UIErrorsFrame:Clear()
@gisikw
gisikw / delayed_job.rb
Created July 13, 2011 14:19
Reason for Errors
def enqueue(*args)
object = args.shift
unless object.respond_to?(:perform)
raise ArgumentError, 'Cannot enqueue items which do not respond to perform'
end
priority = args.first || Delayed::Worker.default_priority
run_at = args[1]
self.create(:payload_object => object, :priority => priority.to_i, :run_at => run_at)
end
@gisikw
gisikw / README.markdown
Created July 27, 2011 03:51
Tips Example

Lorem ipsum

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Etiam laoreet convallis lectus. Maecenas faucibus velit sed sapien.

{{ bash_example.sh }}

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;

@gisikw
gisikw / pathogen.vim
Created December 21, 2011 19:08
Vim Configuration
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.0
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc
" prior to `filetype plugin indent on` is the only other setup necessary.
"