Skip to content

Instantly share code, notes, and snippets.

View aspiers's full-sized avatar

Adam Spiers aspiers

View GitHub Profile
@aspiers
aspiers / gist:cbff7c41ac2998265989
Created January 3, 2015 16:57
onename id proof
Verifying that +aspiers is my openname (Bitcoin username). https://onename.io/aspiers
#!/bin/bash
if [[ $# -ne 1 ]]
then
echo "Usage: ${0} path/to/clone"
exit 1
else
dir=${1}
fi
@admin
Feature: crowbar batch subcommand
As a cloud administrator
I want to use the crowbar batch command
In order to capture cloud configuration and do unattended configuration
Background:
Given the admin node responds to a ping
And I can establish SSH connection
And I can reach the crowbar API
@aspiers
aspiers / gist:1548575
Created January 1, 2012 22:52
diff between rvm --trace get head >& rvm.trace.no-tty and rvm --trace get head |& less -o rvm.trace.tty
--- rvm.trace.no-tty 2012-01-01 22:51:27.000000000 +0000
+++ rvm.trace.tty 2012-01-01 22:51:20.000000000 +0000
@@ -6,6 +6,7 @@
trace __rvm_parse_args:22> rvm_token=get
trace __rvm_parse_args:24> (( 1 > 0 ))
trace __rvm_parse_args:26> next_token=head
+trace __rvm_parse_args:27> shift
trace __rvm_parse_args:32> case get ([[:alnum:]]*|@*)
trace __rvm_parse_args:36> case get (use)
trace __rvm_parse_args:36> case get (install|uninstall|reinstall|try_install)
@aspiers
aspiers / gist:1548587
Created January 1, 2012 22:59
rvm --trace get head |& less -o rvm.trace.tty
trace __rvm_parse_args:715> [[ -n 4.3.11 ]]
trace __rvm_parse_args:747> [[ -z '' && -n '' ]]
trace __rvm_parse_args:749> [[ 0 -eq 1 || -n '' ]]
trace __rvm_parse_args:20> [[ -n get ]]
trace __rvm_parse_args:22> rvm_token=get
trace __rvm_parse_args:24> (( 1 > 0 ))
trace __rvm_parse_args:26> next_token=head
trace __rvm_parse_args:27> shift
trace __rvm_parse_args:32> case get ([[:alnum:]]*|@*)
trace __rvm_parse_args:36> case get (use)
trace __rvm_parse_args:719> [[ -n 4.3.11 ]]
trace __rvm_parse_args:751> [[ -z '' && -n '' ]]
trace __rvm_parse_args:753> [[ 0 -eq 1 || -n '' ]]
trace __rvm_parse_args:20> [[ -n gemset ]]
trace __rvm_parse_args:22> rvm_token=gemset
trace __rvm_parse_args:24> (( 1 > 0 ))
trace __rvm_parse_args:26> next_token=list_all
trace __rvm_parse_args:27> shift
trace __rvm_parse_args:32> case gemset ([[:alnum:]]*|@*)
trace __rvm_parse_args:36> case gemset (use)
@aspiers
aspiers / gem-profiler.pl
Created January 8, 2012 11:36
quick and dirty tool to analyse `strace -efile` output from Rails boot-up
#!/usr/bin/perl
# Try to figure out why booting up Rails causes so many
# open(2) syscalls which fail with ENOENT.
use strict;
use warnings;
my $TOP_N = 50;
@aspiers
aspiers / gist:1578287
Created January 8, 2012 12:56
output from `gem install perftools.rb`
Building native extensions. This could take a while...
ERROR: Error installing perftools.rb:
ERROR: Failed to build gem native extension.
/home/adam/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
(I'm about to compile google-perftools.. this will definitely take a while)
-- tar zxvf google-perftools-1.6.tar.gz
-- patch -p1 < ../../../patches/perftools.patch
-- patch -p1 < ../../../patches/perftools-notests.patch
-- patch -p1 < ../../../patches/perftools-pprof.patch
@aspiers
aspiers / config.log
Created January 8, 2012 12:56
config.log from `gem install perftools.rb`
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by google-perftools configure 1.6, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ ./configure --disable-heap-profiler --disable-heap-checker --disable-debugalloc --disable-shared
## --------- ##
## Platform. ##
@aspiers
aspiers / Guardfile
Created January 8, 2012 20:03
Guardfile
#!/usr/bin/ruby
#
# More info at https://github.com/guard/guard#readme
#USE_SPORK = false
USE_SPORK = true
guard_opts = {
all_on_start: true,
all_after_pass: true,