- partial fix: add this to your user keybindings (this only works between files, not within a file)
[
{ "keys": ["ctrl+o"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+i"], "command": "prev_view_in_stack" }
]
| #Do you prefer this? | |
| merchant["thing"] = important_stuff.map { |important_thing| important_thing["units"] }.inject(&:+) | |
| #Or this? | |
| important_stuff.each { |important_thing| merchant["thing"] += important_thing["units"] } | |
| #Why? Is it completely objective? Or are ruby's idioms/social mores/conventions the deciding factor? |
| window.CountCalculator=window.PriceCalculator=window.TaxCalculator=window.ShippingCaclulator = { | |
| calculate: (num) -> (num == undefined ? 0 : num + 1) } | |
| ChainsCalls = | |
| chain: (dependencies, method) -> | |
| _(dependencies).inject((memo, dependency) -> | |
| dependency[method](memo) | |
| , undefined) | |
| Invoice = |
| #see http://jjinux.blogspot.com/2012/02/ruby-working-around-ssl-errors-on-os-x.html | |
| require 'open-uri' | |
| require 'net/https' | |
| module Net | |
| class HTTP | |
| alias_method :original_use_ssl=, :use_ssl= | |
| def use_ssl=(flag) |
| var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); |
| ree-1.8.7-2011.03 :003 > hash = Hash.new([]) | |
| => {} | |
| ree-1.8.7-2011.03 :004 > hash[:asdf] << 1 | |
| => [1] | |
| ree-1.8.7-2011.03 :005 > hash[:fdsa] | |
| => [1] | |
| ree-1.8.7-2011.03 :006 > |
| git branch -r | grep kbaribeau | grep -v ${stuff_to_keep} | cut -d '/' -f 2-9 | sed -e 's/^/:/' | xargs git push origin |
| #foo.rb | |
| class Foo < Bar | |
| end | |
| #bar.rb | |
| class Bar < ActiveRecord::Base | |
| #all sorts of crazy code that depends on a bunch of wacky stuff my tests don't care about | |
| end |
| class Foo | |
| Object = nil | |
| def getBinding() | |
| binding() | |
| end | |
| end | |
| Foo::Object #returns nil | |
| Object #returns Object |
| #!/bin/bash | |
| set -e | |
| for file in `curl -s https://www.destroyallsoftware.com/screencasts/catalog | | |
| grep screencasts | | |
| tail -n +6 | | |
| grep '(' | | |
| cut -d '"' -f 2`; do | |
| filename=$(echo $file | cut -d '/' -f 4) |