View sources
1 2
http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu48_4.8.1.1-3ubuntu0.5_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu-dev_4.8.1.1-3ubuntu0.5_amd64.deb
View fake_regexp.rb
1 2 3 4 5 6 7 8 9 10
require 'active_support/all'
 
class FakeRegexp
def initialize(pattern)
@pattern = pattern
end
 
def matches?(str)
case
when pattern.empty?
View author.rb
1 2 3 4 5 6 7 8 9 10
class Post
include Cequel::Record
belongs_to :blog
key :id, :timeuuid, auto: true
column :author_id, :timeuuid
# other column definitions
def author
@author ||= User.find(author_id)
View hackbone.js
1 2 3 4 5 6 7 8 9
window.Hackbone = (function () {
var hackbone, setupEvents;
 
hackbone = {
extend: function (prototype) {
var view = Backbone.View.extend(prototype),
selector = view.prototype.el;
 
if (typeof selector !== 'undefined') {
View dotmatrix_cheat_sheet.md

Command line

General-purpose

hcd DIR Go to DIR in your $HASHROCKET_DIR
ll List contents of directory in long format
View start_passenger
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
 
require 'bundler'
Bundler.setup(:default, :development)
require 'rack-debug/debugger'
require 'pry-remote'
 
system('rm', '-fv', 'tmp/rack-debug.*')
 
fork { exec 'bundle', 'exec', 'passenger', 'start' }
View trie.rb
1 2 3 4 5 6 7 8 9 10
class Trie
include Enumerable
 
def initialize
@leaf, @children = false, {}
end
 
def <<(value)
add_enum(value_to_enum(value))
end
View monkeypatch.rb
1 2 3 4 5 6 7 8 9 10
#
# Monkeypatching gem dependencies is a fact of life. But it's dangerous, because *any* update
# to a library might change internals that your patch depends on. This little snippet allows you
# to leave "reminders" in your code that you're relying on a particular version of a gem, and blows
# up if the gem loaded at runtime doesn't fit the requirement.
#
# Example:
#
# monkeypatch('awesome_lib', '1.2.2') do
# module AwesomeLib
View clip.rb
1 2 3 4 5 6 7
class Object
def clip
string = to_s
IO.popen('pbcopy', 'w') { |io| io << string }
string
end
end
View speaker.md
Something went wrong with that request. Please try again.