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
$ ./bash_caller | |
script: Before failing command | |
script: After failing command | |
function: Before failing command |
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 | |
def time(tokens) | |
if tokens.first =~ /^\d+-\d+-\d+T/ | |
tokens.first | |
else | |
tokens[0..2].join(' ') | |
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
#!/usr/bin/env ruby | |
# Classifies a list of wfids into probably what workflow they come from, | |
# just based on the name. | |
require 'pp' | |
require 'set' | |
counters = Hash.new(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
# Test case for disabling utility function smells. Should smell like | |
# UtilityFunction | |
class NoSuppression | |
def utility_function | |
STDOUT.puts "I'm a utility function" | |
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
rcobb@rcobb-x250: ~/try_tb$ ruby roar_examples.rb | |
SENT: {"title":"with links","_links":{"self":{"href":"http://junk.example.com/and/nothing/else"}}} | |
PARSED: #<Song title="with links"> | |
SELF LINK: | |
rcobb@rcobb-x250: ~/try_tb$ |
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
rcobb@rcobb-x250: (6280738...) ~/github/benzado/heroic-sns$ ruby --version ; rvm --version ; bundle --version ; gem --version | |
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux] | |
rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] | |
Bundler version 1.7.6 | |
2.5.1 | |
rcobb@rcobb-x250: (6280738...) ~/github/benzado/heroic-sns$ bundle install --jobs=3 --retry=3 | |
Resolving dependencies... | |
Using json 1.8.3 | |
Using rake 10.5.0 | |
Using rack 1.6.4 |
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
The abbreviation of an action is the same as its first two letters, *except* for a few that are ambiguous otherwise: | |
ap | apply | |
ca | cancel cancel_process | |
ce | ceased | |
dc | dispatch_cancel | |
dd | dispatched | |
di | dispatch | |
dp | dispatch_pause | |
dr | dispatch_resume |
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
To: Blah <[email protected]> | |
From: Me <[email protected]> | |
Subject: Test quoted-printable HTML mail | |
Mime-Version: 1.0 | |
Content-Type: text/html; | |
charset=UTF-8 | |
Content-Transfer-Encoding: quoted-printable | |
<html class=3D"slim"></html> | |
<p> |
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 VehicleEnum | |
include DataMapper::Resource | |
property :id, Serial | |
property :name, String | |
property :state, Enum[ :parked, :idling ] | |
state_machine :initial => :parked do | |
event :ignite do | |
transition :parked => :idling |