I hereby claim:
- I am zaius on github.
- I am davidkelso (https://keybase.io/davidkelso) on keybase.
- I have a public key whose fingerprint is 2B2C 209F BCC0 BF21 4234 7292 7427 8BD5 9B48 8C48
To claim this, I am signing this object:
# Include this in your .irbrc | |
def unbundled_require(gem) | |
if defined?(::Bundler) | |
spec_path = Dir.glob("#{Gem.dir}/specifications/#{gem}-*.gemspec").last | |
if spec_path.nil? | |
warn "Couldn't find #{gem}" | |
return | |
end | |
spec = Gem::Specification.load spec_path |
# Remap prefix to ctrl-s - keeps ctrl-a free for start of line | |
set -g prefix C-s | |
unbind C-b | |
# Keep consistent with screen behavior | |
bind C-s last-window | |
bind C-d detach | |
bind C-c new-window | |
bind C-r source-file $HOME/.tmux.conf |
#!/usr/bin/env ruby | |
require 'curb' | |
require 'yaml' | |
hosts = %w( | |
example.com | |
google.com | |
) |
# Put in config/initializers/handlebars.rb | |
# Add templates to app/assets/javascripts/templates/whatever.js.handlebars | |
# Then require from applicaiton.js (or any manifest) as usual. e.g. | |
# //= require_tree templates | |
class EmberHandlebars < Tilt::Template | |
def self.default_mime_type | |
'application/javascript' | |
end |
App.Post = App.Model.extend App.RelationshipMixinFactory('comments'), | |
comments: DS.hasMany('comment', async: true) |
fs = require 'fs' | |
util = require 'util' | |
{spawn} = require 'child_process' | |
steps = [] | |
# NOTE: can't use console to output as it's buffered. | |
log = (args...) -> | |
out = process.stdout.write args.join(' ') + '\n' |
zaius@pro:~$ irb | |
irb(main):001:0> (2 + | |
irb(main):002:1* 3) | |
=> 5 | |
irb(main):003:0> (2 | |
irb(main):004:1> +3) | |
=> 3 |
fs = require 'fs' | |
path = require 'path' | |
RSVP = require 'rsvp' | |
rimraf = require 'rimraf' | |
mkdirp = require 'mkdirp' | |
walkSync = require 'walk-sync' | |
# Passing in a srcDir allow us to know where the path should be relative to. | |
# This means we can autocreate subdirectories for all files. | |
exports.linkFiles = (files, srcDir, destDir) -> |
I hereby claim:
To claim this, I am signing this object:
var foo = 1; | |
var bar = 1; | |
(function() { | |
console.log(foo, bar) | |
var bar = 2 | |
foo = 2 | |
console.log(foo, bar) | |
})() |