Skip to content

Instantly share code, notes, and snippets.

@andrewcstewart
andrewcstewart / vagrant-drupal error 1
Created April 5, 2013 13:33
chef fails to complete during vagrant-drupal 'vagrant up'.
$ vagrant up
There were warnings and/or errors while loading your Vagrantfile.
Your Vagrantfile was written for an earlier version of Vagrant,
and while Vagrant does the best it can to remain backwards
compatible, there are some cases where things have changed
significantly enough to warrant a message. These messages are
shown below.
Warnings:
* `config.vm.customize` calls are VirtualBox-specific. If you're
@andrewcstewart
andrewcstewart / MediaWiki:Bootstrap-navbar
Created March 2, 2013 23:57
sample MediaWiki:Bootstrap-navbar
* SEARCH
* NAVIGATION
** [[Main_Page|Main]]
** [[Special:RecentChanges|Recent Chages]]
** [[Special:RandomPage|Random Page]]
** [[Help]]
* TOOLBOX
@andrewcstewart
andrewcstewart / httpd.conf.galaxy
Created February 27, 2013 14:12
Galaxy apache proxy config
RewriteEngine on
RewriteRule ^/galaxy$ /galaxy/ [R]
RewriteRule ^/galaxy/static/style/(.*) /Users/galaxy/galaxy-dist/static/june_2007_style/blue/$1 [L]
RewriteRule ^/galaxy/static/scripts/(.*) /Users/galaxy/galaxy-dist/static/scripts/packed/$1 [L]
RewriteRule ^/galaxy/static/(.*) /Users/galaxy/galaxy-dist/static/$1 [L]
RewriteRule ^/galaxy/favicon.ico /Users/galaxy/galaxy-dist/static/favicon.ico [L]
RewriteRule ^/galaxy/robots.txt /Users/galaxy/galaxy-dist/static/robots.txt [L]
RewriteRule ^/galaxy(.*) http://localhost:8080$1 [P]
>>> x = []
>>> y = [x, [x], dict(x=x)]
>>> import objgraph
>>> objgraph.show_refs([y], filename='sample-graph.png')
Graph written to ....dot (... nodes)
Image generated as sample-graph.png
import pycallgraph
pycallgraph.start_trace()
# insert code
pycallgraph.make_dot_graph('test.png')
-- Find the note in omnifocus for the current project / folder
-- (or create a new one) and display it.
-- Created by Mark Fowler ([email protected])
-- Help from http://veritrope.com/code/search-evernote-for-notes-containing-link-to-selected-omnifocus-item/
-- on getting the name / url for the current omnifocus item
tell front window of application "OmniFocus"
try
@andrewcstewart
andrewcstewart / gist:3249363
Created August 3, 2012 16:42
Shortest command line arithmetic
bc<<<2+2
#!/usr/bin/perl -w
use strict;
print "Hello world, this is an example of a gist embedded in a wp post.\n";
@andrewcstewart
andrewcstewart / gist:1295816
Created October 18, 2011 16:00
Bio::DB::GenBank
DB<124> $stream = $db->get_Stream_by_id(\@a);
DB<125>
------------- EXCEPTION: Bio::Root::Exception -------------
MSG: WebDBSeqI Request Error:
500 write failed: Connection reset by peer
Content-Type: text/plain
Client-Date: Tue, 18 Oct 2011 15:58:29 GMT
Client-Warning: Internal response
@andrewcstewart
andrewcstewart / gist:1293823
Created October 17, 2011 21:08
Bio::DB::Fasta error
DB<21> $db = Bio::DB::Fasta->new('out.fa');
indexing was interrupted, so unlinking out.fa.index at /usr/lib/perl5/site_perl/5.8.8/Bio/DB/Fasta.pm line 1053.
at /usr/lib/perl5/site_perl/5.8.8/Bio/DB/Fasta.pm line 1053
Bio::DB::Fasta::DESTROY('Bio::DB::Fasta=HASH(0x14d3b8a0)') called at /usr/lib/perl5/vendor_perl/5.8.8/Error.pm line 184
eval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/Error.pm line 184
DB::eval called at /usr/lib/perl5/5.8.8/perl5db.pl line 3410
DB::DB called at -e line 1