- Twitter: @0utoftime
- Website or Blog: http://github.com/outoftime
- Company: Rap Genius http://rapgenius.com
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
FROM TO ALLOWED? | |
=================================== | |
ascii -> blob true | |
ascii -> boolean false | |
ascii -> decimal false | |
ascii -> double false | |
ascii -> inet false | |
ascii -> int false | |
ascii -> float false | |
ascii -> bigint false |
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
class Object | |
def clip | |
string = to_s | |
IO.popen('pbcopy', 'w') { |io| io << string } | |
string | |
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
# | |
# 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 |
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
class Trie | |
include Enumerable | |
def initialize | |
@leaf, @children = false, {} | |
end | |
def <<(value) | |
add_enum(value_to_enum(value)) | |
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
#!/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' } |
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
window.Hackbone = (function () { | |
var hackbone, setupEvents; | |
hackbone = { | |
extend: function (prototype) { | |
var view = Backbone.View.extend(prototype), | |
selector = view.prototype.el; | |
if (typeof selector !== 'undefined') { |
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
require 'active_support/all' | |
class FakeRegexp | |
def initialize(pattern) | |
@pattern = pattern | |
end | |
def matches?(str) | |
case | |
when pattern.empty? |
OlderNewer