This file contains hidden or 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
empty_filters = (args[:reseller_filter].empty? && args[:user_filter].empty?) | |
owner_filter = args[:reseller_filter].include?(u['owner']) | |
user_filter = args[:user_filter].include?(u['user']) | |
if empty_filters || (owner_filter || user_filter) |
This file contains hidden or 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 OnePassword | |
DATA = File.read("#{ENV['HOME']}/Desktop/1Password.txt") | |
def self.passwords | |
return @passwords if @passwords | |
data = DATA.dup.lines.to_a.map { |line| line.strip.split("\t") } | |
header = data.shift | |
@passwords = data.map {|line| Hash[header.zip(line)]} | |
end |
This file contains hidden or 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
Day Job: | |
Open Source contribution (if any): | |
Tell me about your experience with Ruby/Rails: | |
How do you use GitHub: | |
Favorite luchador(es): |
This file contains hidden or 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
var SALister; | |
SALister = (function() { | |
function SALister() {} | |
SALister.prototype.loadList = function(what, o) { | |
var callParams, success, _o; | |
what = what.toLowerCase(); | |
_o = { | |
regex: null, | |
container: what + 'List', | |
pagStart: null, |
This file contains hidden or 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
required = [ | |
:i, | |
:city, | |
:region, | |
:postal, | |
:country, | |
:license_key | |
] | |
optional = [ |
This file contains hidden or 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
~ ➔ ruby -rpsych -ryaml -e 'YAML.load("[:year]")' | |
/Users/headius/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 1 column 0 (Psych::SyntaxError) | |
from /Users/headius/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse_stream' | |
from /Users/headius/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:119:in `parse' | |
from /Users/headius/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:106:in `load' | |
from -e:1:in `<main>' | |
~ ➔ ruby -ryaml -e 'YAML.load("[:year]")' |
This file contains hidden or 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 Spec::Example::ExampleGroup | |
def execute(*args, &block) | |
DB.transaction do | |
begin | |
super(*args, &block); | |
ensure | |
raise Sequel::Error::Rollback | |
end | |
end | |
end |
This file contains hidden or 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
root@huckleberry [~]# vim --version | |
VIM - Vi IMproved 7.0 (2006 May 7, compiled Sep 9 2010 18:43:42) | |
Included patches: 1, 3-4, 7-9, 11, 13-17, 19-26, 29-31, 34-44, 47, 50-56, 58-64, 66-73, 75, 77-92, 94-107, 109, 202, 234-237 | |
Modified by <[email protected]> | |
Compiled by <[email protected]> | |
Huge version without GUI. Features included (+) or not (-): | |
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent | |
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments | |
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic | |
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path |
This file contains hidden or 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
~/projects/jruby ➔ ls lib/ruby/gems/1.8/gems/ | wc -l | |
471 | |
~/projects/jruby ➔ time jruby -rubygems -e 1 | |
real 0m5.079s | |
user 0m7.375s | |
sys 0m0.393s | |
~/projects/jruby ➔ git stash pop --quiet |
This file contains hidden or 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 | |
def output_config | |
puts <<-END | |
graph_category App | |
graph_title Passenger memory stats | |
graph_vlabel count | |
memory.label memory | |
END |