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 'rubygems' | |
require 'chef/client' | |
require 'chef/run_status' | |
require 'ohai' | |
require 'chef/mixin/language' | |
# Override the default role search in capistrano | |
# can be used to combine chef searches in capistrano land: | |
# task :master_update, :roles => 'recipes:chef\:\:server' do | |
# ... |
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
while [ 1 ]; do DAT=$(./varnish_elapsed_undirected); echo $DAT; echo "transient.fast.f04.varnish.$DAT `date +'%s'`" | socat - TCP4:graphite_server:2003; done |
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 'rubygems' | |
require 'json' | |
require 'open-uri' | |
require 'yaml' | |
critical = false | |
warn= false |
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
# Broken Command: | |
16/03 10:34 ~/github/bundle.t% bundle install | |
Fetching gem metadata from http://gemcutter.org/...... | |
Fetching gem metadata from http://gemcutter.org/.. | |
Could not find gem 'commonthread-flickr_fu (= 0.3.0) ruby' in the gems available on this machine. | |
[1] 83758 exit 7 bundle install | |
# Look for missing gem: |
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
function ca | |
command cdargs --add=":$argv:$PWD" | |
end | |
function cv | |
cdargs "$argv"; and cd (cat "$HOME/.cdargsresult") | |
end | |
function _cdargs_completion | |
cat ~/.cdargs | cut -d' ' -f1 | xargs echo | |
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
class SelfableTask(tasks.WrappedCallableTask): | |
def __init__(self, callable, *args, **kwargs): | |
super(SelfableTask, self).__init__(callable, *args, **kwargs) | |
if hasattr(callable, '__module__'): | |
self.__module__ = callable.__module__ | |
def run(self, *args, **kwargs): | |
old_module = env.get('current_module', None) | |
old_task = env.get('current_task', None) | |
env['current_task'] = self.__name__ |
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
define ruby_stack_trace | |
set $VM_FRAME_MAGIC_METHOD = 0x11 | |
set $VM_FRAME_MAGIC_BLOCK = 0x21 | |
set $VM_FRAME_MAGIC_CLASS = 0x31 | |
set $VM_FRAME_MAGIC_TOP = 0x41 | |
set $VM_FRAME_MAGIC_FINISH = 0x51 | |
set $VM_FRAME_MAGIC_CFUNC = 0x61 | |
set $VM_FRAME_MAGIC_PROC = 0x71 | |
set $VM_FRAME_MAGIC_IFUNC = 0x81 | |
set $VM_FRAME_MAGIC_EVAL = 0x91 |
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
[Thread debugging using libthread_db enabled] | |
[New Thread 0x7f8672507700 (LWP 3582)] | |
0x00000000004ba000 in find_entry (table=0xaa60c8, key=86239440, value=0x7fffa63b4a78) at st.c:451 | |
in st.c | |
#0 0x00000000004ba000 in find_entry (table=0xaa60c8, key=86239440, value=0x7fffa63b4a78) at st.c:451 | |
#1 st_lookup (table=0xaa60c8, key=86239440, value=0x7fffa63b4a78) at st.c:505 | |
#2 0x00000000004f53dd in rb_mark_generic_ivar (obj=86239440) at variable.c:910 | |
#3 0x000000000041ecc2 in gc_mark_children (objspace=0x9ac990, ptr=86239440, lev=1) at gc.c:1868 | |
#4 0x000000000041f9fc in mark_locations_array (start=0xaef68d0, end=<value optimized out>) at gc.c:1603 | |
#5 gc_mark_locations (start=0xaef68d0, end=<value optimized out>) at gc.c:1616 |
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
#include <SoftwareSerial.h> | |
// This is the input and output of the ePIR | |
#define rxPin 3 | |
#define txPin 2 | |
// we will switch on and off the onboard led. | |
#define onBoardLed 13 | |
// set up a new serial port |
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
libraryDependencies += "org.jruby" % "jruby" % "1.7.2" | |
libraryDependencies += "org.mozilla" % "rhino" % "1.7R4" | |