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 "./rake_lib" | |
require "./test_task" | |
exec ARGV.first.to_sym |
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 Disposable | |
class Twin | |
def self.fake | |
types = {} | |
representer_class.representable_attrs[:definitions].each_pair do |key, value| | |
types[key] = value.instance_variable_get(:@options)[:type] | |
end | |
attributes = {} | |
puts types | |
types.each_pair do |key, type| |
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
vpncfg { | |
connections { | |
enabled = yes; | |
conn_type = conntype_user; | |
name = "iPhone"; | |
always_renew = no; | |
reject_not_encrypted = no; | |
dont_filter_netbios = yes; | |
localip = 0.0.0.0; | |
local_virtualip = 0.0.0.0; |
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
jQuery(function($) { | |
(function n(e){ | |
e.eq(0).fadeIn(99, | |
function(){ | |
n(e.slice(1)) | |
} | |
)} | |
)($(":visible").hide()) | |
}) |
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
alias l='ls -la' | |
alias ..='cd ..' | |
alias r='rails' | |
alias rs='rails server' | |
alias rc='rails console' | |
alias pubkey='cat .ssh/id_rsa.pub | pbcopy' |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
export PS1="\[\e[0m\]\w\[\e[0m\]\$(parse_git_branch) \$ " |
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
ActiveSupport::Subscriber.subscribers.flat_map(&:patterns).grep(/trailblazer/).map &ActiveSupport::Notifications.method(:unsubscribe) |
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
#http://wiki.macromates.com/Reference/Settings | |
fontSize = 12 | |
fontName = Monaco | |
showInvisibles = true | |
spellChecking= true | |
excludeInFileChooser = "{$exclude,public/uploads/assets,\.git,\.sass-cache/}" | |
windowTitle = "$TM_DISPLAYNAME${TM_DIRECTORY/\A(?:\/Users\/captainhagbard\w+\/?(.*)|(.+))\z/${2:? – ${2/\A\/Users\/captainhagbard/~/}:${1/\A(?=.)/ – /}}/}" |
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 OptimalPath | |
def initialize(road_system) | |
@road_system = road_system | |
end | |
def solve | |
bestA, bestB = | |
@road_system.inject([Path.new, Path.new]) do |(pathA, pathB), section| | |
road_step(pathA, pathB, section) | |
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
sort $HISTFILE | uniq -c | sort -k1 -rn | head -n 30 |
OlderNewer