Skip to content

Instantly share code, notes, and snippets.

@andrewcstewart
andrewcstewart / gist:1248042
Created September 28, 2011 14:13
Adium unresponsive UI
Sampling process 5871 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Adium (pid 5871) every 1 millisecond
Process: Adium [5871]
Path: /Applications/Adium.app/Contents/MacOS/Adium
Load Address: 0x1000
Identifier: com.adiumX.adiumX
Version: 1.4.3 (1.4.3)
Code Type: X86 (Native)
Parent Process: launchd [531]
@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
@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
#!/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:3249363
Created August 3, 2012 16:42
Shortest command line arithmetic
bc<<<2+2
-- Find the note in omnifocus for the current project / folder
-- (or create a new one) and display it.
-- Created by Mark Fowler (mark@twoshortplanks.com)
-- 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
import pycallgraph
pycallgraph.start_trace()
# insert code
pycallgraph.make_dot_graph('test.png')
>>> 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
@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]
@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