This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| require 'java' | |
| require File.dirname(__FILE__) + "/../jars/commons-logging-1.1.1.jar" | |
| require File.dirname(__FILE__) + "/../jars/httpcore-4.0.1.jar" | |
| require File.dirname(__FILE__) + "/../jars/httpclient-4.0.1.jar" | |
| import "org.apache.http.client.ResponseHandler" | |
| import "org.apache.http.client.HttpClient" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/perl | |
| use strict; | |
| use warnings; | |
| use Carp; | |
| use IPC::Run qw/start pump finish timeout run/; | |
| use Getopt::Long; | |
| use Term::ProgressBar; | |
| use File::Which; | |
| use FindBin qw/$Bin/; | |
| use Data::Dumper; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible | |
| filetype off " for Vundle | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " github repos | |
| Bundle 'Shougo/neocomplcache.git' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| ## FUNCTIONS | |
| from_url_to_path(){ | |
| if [ $# -ne 1 ]; then echo "ArgumentError" && return 1; fi; | |
| dirname=`echo $1 | sed 's/^git:\/\/github.com\/.*\///g' | sed 's/\.git$//g'`; | |
| echo "$VIMSET_TMPDIR/$dirname"; | |
| return 0; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # from http://devoh.com/posts/2009/03/couchdb-leopard | |
| # First, create the _couchdb user. | |
| sudo dscl . create /Users/_couchdb UniqueID 115 | |
| sudo dscl . create /Users/_couchdb PrimaryGroupID 115 | |
| sudo dscl . create /Users/_couchdb RealName "CouchDB Server" | |
| sudo dscl . create /Users/_couchdb NFSHomeDirectory /usr/local/pgsql/ | |
| sudo dscl . create /Users/_couchdb Password "*" | |
| sudo dscl . append /Users/_couchdb RecordName couchdb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use File::MimeInfo::Magic; | |
| @File::MimeInfo::DIRS = qw(/usr/local/share/mime/); | |
| File::MimeInfo->rehash(); | |
| use URI; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class String | |
| def constantize_with_context(context=nil, args={:raise => true}) | |
| unless context.nil? | |
| begin | |
| const = context.const_get self.to_sym | |
| rescue NameError => e | |
| if args[:raise] | |
| raise e | |
| else | |
| return constantize_without_context |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Gemfile | |
| gem "ffi-rzmq" | |
| # application.rb | |
| module Foo | |
| class Application | |
| ... | |
| config.zeromq_context = ZMQ::Context.new | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| puts 'test' | |
| puts 'foovar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Bio::Tools::Protscale; | |
| use strict; | |
| use warnings; | |
| use base qw(Bio::Root::Root); | |
| use LWP 5.64; | |
| use HTML::TreeBuilder::XPath; | |
| use Data::Dumper; | |
| =head1 NAME |