Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Spiers aspiers

View GitHub Profile
@aspiers
aspiers / gist:1548575
Created Jan 1, 2012
diff between rvm --trace get head >& rvm.trace.no-tty and rvm --trace get head |& less -o rvm.trace.tty
View gist:1548575
--- 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 Jan 1, 2012
rvm --trace get head |& less -o rvm.trace.tty
View gist:1548587
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)
View gist:1576401
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 Jan 8, 2012
quick and dirty tool to analyse `strace -efile` output from Rails boot-up
View gem-profiler.pl
#!/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 / config.log
Created Jan 8, 2012
config.log from `gem install perftools.rb`
View config.log
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 / gist:1578287
Created Jan 8, 2012
output from `gem install perftools.rb`
View gist:1578287
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
View 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,
@aspiers
aspiers / minitest.txt
Created Jan 8, 2012
guard-minitest error
View minitest.txt
> bundle exec guard
Guard uses Libnotify to send notifications.
Guard is now watching at '/data/music/RotC/eventbook'
>
Running all tests
Run options: --seed 63689
/home/adam/.rvm/gems/ruby-1.9.3-p0@rails-3.1/gems/activesupport-3.1.3/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `/' for nil:NilClass (NoMethodError)
from /home/adam/.rvm/gems/ruby-1.9.3-p0@rails-3.1/bundler/gems/guard-minitest-ad4cb29c78ec/lib/guard/minitest/notifier.rb:12:in `guard_message'
from /home/adam/.rvm/gems/ruby-1.9.3-p0@rails-3.1/bundler/gems/guard-minitest-ad4cb29c78ec/lib/guard/minitest/notifier.rb:28:in `notify'
from /home/adam/.rvm/gems/ruby-1.9.3-p0@rails-3.1/bundler/gems/guard-minitest-ad4cb29c78ec/lib/guard/minitest/runners/version_2_runner.rb:14:in `_run_anything'
@aspiers
aspiers / analyse-py-module-deps.pl
Created Jan 24, 2012
Compares list of imports within a Python codebase with its pip-requires file
View analyse-py-module-deps.pl
#!/usr/bin/perl
use strict;
use warnings;
use File::Find;
@ARGV or unshift @ARGV, '.';
my %imports = ();
@aspiers
aspiers / gist:1672096
Created Jan 24, 2012
Output of running https://gist.github.com/1672094 on OpenStack Nova codebase
View gist:1672096
packages imported and in pip-requires
=====================================
Cheetah
anyjson
boto
carrot
eventlet
feedparser
glance