This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am xn on github. | |
* I am garbhoch (https://keybase.io/garbhoch) on keybase. | |
* I have a public key whose fingerprint is EB80 940E 4C61 D7BB 933F D98C 5B16 C2DA F588 12F1 | |
To claim this, I am signing this object: |
This file contains 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
person = {name: "Bob", age: "23"} | |
"name: %{name}, age: %{age}" % person |
This file contains 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
[credential] | |
helper = osxkeychain | |
[core] | |
editor = sublime -n -w | |
excludesfile = ~/.gitignore | |
whitespace = trailing-space,space-before-tab | |
quotepath = false | |
[alias] | |
a = add | |
aa = add --all |
This file contains 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
alias nombom='echo "(╯°□°)╯︵ ┻━┻ " && npm cache clear && bower cache clean && rm -rf node_modules bower_components && npm install && bower install' |
This file contains 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
irb(main):001:0> require 'active_support/core_ext' | |
=> true | |
irb(main):002:0> x = Date.new(2001) | |
=> Mon, 01 Jan 2001 | |
irb(main):003:0> x - 1.second | |
=> 2000-12-31 23:59:59 -0500 | |
irb(main):004:0> y = DateTime.new(2001) | |
=> Mon, 01 Jan 2001 00:00:00 +0000 | |
irb(main):005:0> y - 1.second | |
TypeError: expected numeric or date |
This file contains 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
p Hash[(instance_variables - [:@options]).map { |i| [i, instance_variable_get(i)] }] |
This file contains 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
describe 'get /projects' do | |
context 'when user logged in' do | |
it "returns a list of projects scoped by user" | |
end | |
end |
This file contains 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
# Add this to more_web_steps.rb | |
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today! | |
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text| | |
window = page.driver.browser.window_handle | |
alert = page.driver.browser.switch_to.alert | |
alert.text.should == text | |
alert.send(action) | |
page.driver.browser.switch_to.window window | |
end |
This file contains 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
In a sinatra app: | |
use ::Rack::PerftoolsProfiler, :default_printer => 'gif', :mode => 'objects' | |
?profile=true×=1 | |
Linux anjaneya 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 18:42:20 UTC 2011 x86_64 GNU/Linux | |
#0 0x00007f30be71b2a3 in select () from /lib/libc.so.6 | |
#1 0x00007f30bf2c954a in rb_thread_select (max=<value optimized out>, read=0x7fff9c5bd5a0, write=0x0, except=0x0, timeout=<value optimized out>) at eval.c:11462 | |
#2 0x00007f30bf2e1f3c in rb_f_select (argc=<value optimized out>, argv=<value optimized out>, obj=<value optimized out>) at io.c:4946 | |
#3 0x00007f30bf2c2d14 in rb_call0 (klass=<value optimized out>, recv=<value optimized out>, id=<value optimized out>, oid=<value optimized out>, argc=<value optimized out>, argv=<value optimized out>, body=0x7f30bf76bde8, flags=0) at eval.c:5928 | |
#4 0x00007f30bf2c2f03 in rb_call (klass=139847347388680, recv=139847347388720, mid=3769, argc=4, argv=0x7fff9c5bd970, scope=0, self=139847234679040) at eval.c:6176 |
This file contains 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
{"series":[{"refresh_changes":true,"refresh_chart":true,"success":true},{"growl":"Started Tracking Enform. Updates should appear on your dashboard shortly."},{"closemodal":false},{"replaceFrom":{"action":"/projects/2bukd1sbny18j7485xi/trackers/2bxqzjtzjepicuudkp0/tracked_projects/add","selector":"#maintain-a-tracker"}}]} |
OlderNewer