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 Thing < Thread | |
def self.start! | |
new do | |
mainloop | |
end | |
end | |
def mainloop | |
loop do | |
puts "working" |
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
rawr! |
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
source :rubygems | |
gem "rack" # redundant since sinatra depends on upon rack though | |
gem "sinatra" |
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
met? { | |
Dir.exist? (cfn_metadata['babushka-deps']) && | |
cd(cfn_metadata['babushka-deps']) do |dir| | |
[ | |
shell "git fetch", | |
shell("git rev-list HEAD..origin/master").stdout.empty?, | |
!shell("git submodule status").stdout.grep /^-/ | |
].all? | |
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
dep "test early fail" do | |
met? { | |
shell "echo first; exit 1" | |
shell "echo secondl exit 1" | |
} | |
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
require 'fileutils' | |
module RelativePaths extend self | |
PREFIX_FILE="~/.babuska/cache/install_prefix".p | |
PREFIX_ENV_VAR="BABUSHKA_PREFIX".freeze | |
module Mixin | |
# A helper for generating paths relative to a given path, specified in the | |
# environment but cached from thenceforth | |
def path(p) | |
RelativePaths.prefix.p / p.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
settings = { | |
"perl/core/scripts" = { | |
timezones = "mel:Australia/Melbourne sf:America/Los_Angeles samurai:CST6CDT"; | |
timezones_clock_format = "%H:%M"; | |
}; | |
}; | |
statusbar = { | |
default = { | |
items = { |
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
==> /var/log/supervisor/testcloud-broker-stderr---supervisor-h_gimE.log <== | |
PHP Notice: Undefined offset: 0 in /home/ubuntu/testcloud/bin/testbroker on line 133 | |
PHP Fatal error: Call to a member function body() on a non-object in /home/ubuntu/testcloud/bin/testbroker on line 133 |
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
# vi: ft=ruby | |
def physical_memory | |
`sysctl hw.memsize`.chomp.split(" ")[1].to_i | |
end | |
def wireless_adaptor | |
case `uname -s`.chomp | |
when "Darwin" | |
"en0" | |
when "Linux" |
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
#!/bin/sh | |
files=no | |
dirs=no | |
ack=no | |
while getopts "fda" opt; do | |
case $opt in | |
f) | |
files=yes | |
break;; |