Skip to content

Instantly share code, notes, and snippets.

Rubinius Crash Report #rbxcrashreport
[[Exception]]
A toplevel exception occurred
Error trying to compile /Users/james/rubies/main/Languages/Ruby/Tests/Experiments/19/args.rb (Rubinius::CompileError)
Backtrace:
Rubinius::Compiler.compiler_error at /Users/james/.rvm/rubies/rbx-head/runtime
/19/compiler/compiler.rbc:13
Rubinius::Compiler.compile at /Users/james/.rvm/rubies/rbx-head/runtime
def []=(*args)
p args
end
a = ['a']
self[1,*a,2] = 2
@jredville
jredville / url_helper.rb
Created April 27, 2012 06:00
Use Rails url helpers from within console
#hat tip: http://stuartsierra.com/2008/01/08/testing-named-routes-in-the-rails-console
include ActionController::UrlWriter
default_url_options[:host] = 'whatever'
@jredville
jredville / rm-deleted.sh
Created April 29, 2012 19:28
Remove deleted files from git index
#from http://tmblr.co/ZfQknxFg4-sp
git ls-files -d | xargs git rm
@jredville
jredville / sample.js
Created June 1, 2012 21:54
Idea for a JS interview question... in progress
//Define counter
var counter = ____;
var counter2 = ____;
counter.value(); // 0
counter.increment();
counter.value(); //1
counter2.value(); //0
SELECT spree_products.* FROM "spree_products"
INNER JOIN "spree_products_taxons" ON "spree_products_taxons"."product_id" = "spree_products"."id"
WHERE "spree_products_taxons"."taxon_id" = 31989848 OR "spree_products_taxons"."taxon_id" = 2000
@jredville
jredville / tips
Created June 23, 2012 14:32
git https
With git 1.7.9 or later, you can just do:
git config --global credential.helper cache
... which tells git to keep your password cached in memory for (by default) 15 minutes. You can set a longer timeout with:
git config credential.helper 'cache --timeout=3600'
(That example is suggested in the GitHub help page for Linux.) GitHub's help also suggests that if you're on Mac OS and used homebrew to install git, you can use the native Mac OS keystore with:
git config --global credential.helper osxkeychain
@jredville
jredville / destructure.coffee
Created August 13, 2012 20:16
destructuring trick
args =
column:
isBand: false
foo: 'bar'
row:
dataRowIndex: 1
foo: 'bar'
_cellIndex: 1
foo: 'bar'
@jredville
jredville / index.html
Created August 24, 2012 06:22 — forked from anonymous/index.html
An experiment, powered by a hidden resizable textarea.
<h1>Try to Pull the Arrow <span class="me">Down</span></h1>
<div class="wrapper wbot">
<div class="content">
<ul>
<li><a href="#">Cool, HUH</a></li>
<li><a href="#">Try to</a></li>
<li><a href="#">Pull the</a></li>
<li><a href="#">Arrow Up</a></li>
<li><a href="http://codepen.io/mmoustafa" target="_blank" class="me">mmoustafa</a></li>
@jredville
jredville / temp.coffee
Created September 7, 2012 16:51
Ruby and Coffeescript destructured assignment
# more info at http://coffeescript.org/#destructuring
# Coffeescript also allows "pattern matching" style assignment
args =
column:
isBand: false
foo: 'bar'
row:
dataRowIndex: 1
foo: 'bar'