View Rakefile
Rake::TestTask.new do |t|
ENV['RACK_ENV'] = 'test'
Rake::Task["db:migrate"].execute
t.libs << "."
t.test_files = FileList['test/*_test.rb']
t.verbose = true
t.warning = false
end
# How do I make this task depend on the "db:migrate" task, instead of explicitly invoking it?
View foo.erb
file {
'/srv/exports':
owner => 'root',
group => 'root',
mode => '0755',
ensure => directory;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am ironcamel on github.
  • I am ironcamel (https://keybase.io/ironcamel) on keybase.
  • I have a public key whose fingerprint is E0BD 638C EB38 02EB BE57 0C2F 6BCB 7F1F 8FC8 4B48

To claim this, I am signing this object:

View README.md

Check if you are vulnerable to the OpenSSL « heartbleed » bug.

curl -s https://gist.githubusercontent.com/ironcamel/10223348/raw/ssl-heartbleed-check.pl | perl
View recursive-closure.pl
my $factorial = sub {
my $val = shift;
return $val * __SUB__->($val - 1) if $val > 1;
return $val;
};
print $factorial->(5);
View p
#!/usr/bin/env perl
# Based on Randy Stauner's http://blogs.perl.org/users/randy_stauner/2011/06/exploratory-one-liners-with-less-typing.html
# and Marco Fontani's https://gist.github.com/1042504.
# To install all dependencies:
# sudo cpanm File::Slurp JSON::XS Data::Dump YAML::XS utf8::all Class::Autouse
# Installation:
# copy this file to ~/bin/p
# Example usage:
# p 'dd [File::Spec->path]' # dynamically load arbitrary modules
# p -pe 's/foo/bar/' foo.txt # use your favorite options like -lane
View script-runner.vim
nmap <F5> :call Run('perl')<CR>
cabbrev pyx call Run('python')
cabbrev perlx call Run('perl')
cabbrev rubyx call Run('ruby')
fu! NewThrowawayBuffer()
new
setlocal noswapfile
setlocal buftype=nowrite
setlocal bufhidden=delete
View JSON-Schema.diff
235c235
< checkProp($value, $type, $path, undef, $_changing);
---
> $self->checkProp($value, $type, $path, undef, $_changing);
283c283
< checkProp($value, $schema->{'extends'}, $path, $i, $_changing);
---
> $self->checkProp($value, $schema->{'extends'}, $path, $i, $_changing);
304,306c304,307
< if (ref $schema->{'items'} eq 'ARRAY')
View treewidth.h
/*
Treewidth is a class that reduces a graph by a series of "safe" rules.
It also generates a minimum value for the treewidth of the graph.
The rules that have been implemented so far are:
* Islet Rule
* Twig Rule
* Series Rule
* Triangle Rule
* Simplicial Rule
* Almost Simplicial Rule
View freenode.yml
conn_info:
server: irc.freenode.net
port: 6667
channels:
- '#foo'
- '#bar'
nick: foobot
username: foobot
name: defender of the universe
ignore_list: