Skip to content

Instantly share code, notes, and snippets.

Christopher Galtenberg galtenberg

Block or report user

Report or block galtenberg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wat-to-date
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'upstream/master'.
$ git pull -r
remote: Counting objects: 167, done.
remote: Compressing objects: 100% (114/114), done.
remote: Total 167 (delta 74), reused 12 (delta 12), pack-reused 41
Receiving objects: 100% (167/167), 58.66 KiB | 0 bytes/s, done.
Resolving deltas: 100% (81/81), completed with 11 local objects.
@galtenberg
galtenberg / lkmake.rb
Created Aug 6, 2014
Creates Lkmake/Simplenote import-compatible json given plaintext file of notes separated by two blank lines
View lkmake.rb
# Creates Lkmake/Simplenote import-compatible json given plaintext file of notes separated by two blank lines
# Author: Christopher Galtenberg
# License: Use it for good, however you like
# Input file:
# example note 1
#
# example note 2
@galtenberg
galtenberg / gist:7586796
Created Nov 21, 2013
Current spec failures
View gist:7586796
1)
'NewRelicSso#initialize timestamp should == 1385054736' FAILED
expected: 1385054736,
got: 1357027200 (using ==)
/Users/nu_numina/dev/boxpanel/spec/lib/new_relic_sso_spec.rb:15:in `block (3 levels) in <top (required)>'
/Users/nu_numina/.rvm/gems/ruby-1.9.3-p385@boxpanel/bin/ruby_noexec_wrapper:14:in `eval'
/Users/nu_numina/.rvm/gems/ruby-1.9.3-p385@boxpanel/bin/ruby_noexec_wrapper:14:in `<main>'
2)
'UserHelper User Helper#login_person sets the authed_customer_id session variable to the first active_customers id' FAILED
@galtenberg
galtenberg / gist:949680
Created Apr 30, 2011 — forked from mudge/gist:924909
Removing the jQuery Example plugin from operating on an element.
View gist:949680
/* Let's say your element '#example' has already been bound
* with $('#example').example().
*/
/* This will get rid of the example immediately.
* Note that this will not return the original jQuery object so
* we can't chain anything onto this call.
*/
$('#example').triggerHandler('focus');
@galtenberg
galtenberg / RVM Git post-checkout hook
Created Nov 17, 2010
Switch rvm after git checkout
View RVM Git post-checkout hook
#!/bin/bash
#Filename: .git/hooks/post-checkout
#Note: make sure to chmod +x post-checkout
CURRENT=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\\ \1/'`
if [ $CURRENT = "upgrade" ]; then
rvm use r19
else
View miniskirt.rb
# Factory girl, relaxed.
#
# Factory.define :user do |f|
# f.login 'johndoe%d' # Sequence.
# f.email '%{login}@example.com' # Interpolate.
# f.password f.password_confirmation('foobar') # Chain.
# end
#
# Factory.define :post do |f|
# f.user { Factory :user } # Blocks, if you must.
View minidress.rb
# More "proper" than a miniskirt (http://gist.github.com/273579).
class Minidress
@@factories = {}
class << self
def define(name, &block)
@@factories[name.to_s] = block
end
def build(name, attrs = {})
new(name.to_s.classify.constantize.new, &@@factories[name.to_s]).record
You can’t perform that action at this time.