Skip to content

Instantly share code, notes, and snippets.

View richo's full-sized avatar

richö butts richo

View GitHub Profile
class Thing < Thread
def self.start!
new do
mainloop
end
end
def mainloop
loop do
puts "working"
rawr!
source :rubygems
gem "rack" # redundant since sinatra depends on upon rack though
gem "sinatra"
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
}
dep "test early fail" do
met? {
shell "echo first; exit 1"
shell "echo secondl exit 1"
}
end
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
@richo
richo / config
Created September 1, 2012 14:07
settings = {
"perl/core/scripts" = {
timezones = "mel:Australia/Melbourne sf:America/Los_Angeles samurai:CST6CDT";
timezones_clock_format = "%H:%M";
};
};
statusbar = {
default = {
items = {
==> /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
# 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"
#!/bin/sh
files=no
dirs=no
ack=no
while getopts "fda" opt; do
case $opt in
f)
files=yes
break;;