This file contains 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
require 'rubygems' | |
require_gem 'activerecord' | |
require '/var/www/hoosier/app/models/payment_method' | |
#Connect to the database | |
ActiveRecord::Base.establish_connection( | |
:adapter => "postgresql", | |
:host => "localhost", | |
:username => "****", | |
:password => "****", |
This file contains 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
Task: Protein lookup | |
Find protein structure for 1MBN | |
From PDB | |
Return sequence of protein | |
Task: Blast | |
Run BLAST | |
Using the protein sequence from Protein lookup task | |
On uniprot | |
Select all hits with e < 0.00001 |
This file contains 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
# This is a simple command line tool for uploading | |
# and folders of files to AWS S3. You must first | |
# create a vaild bucket to upload to. | |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'pathname' | |
require 'aws/s3' | |
include AWS::S3 |
This file contains 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 | |
# save as pubmed.rb and test using 'ruby pubmed.rb 19662644' | |
# keyword search may return > 1 record due to retmax bug | |
# http://github.com/bioruby/bioruby/commit/51c3223e033b2992a7bd95da282f88164406ff92 | |
# From Neil Saunders http://gist.github.com/164994 | |
require 'rubygems' | |
require 'bio' | |
keywords = ARGV.join(' ') |
This file contains 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
# If you use osx terminal/git this includes a couple nice features: | |
# 1) Minimalist colors | |
# 2) Stripped down CLEAN prompt | |
# 3) For GIT folders it will display the current branch. | |
# To install just copy this into the top of your ~/.bash_profile | |
# Based on http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} |
This file contains 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
#SWITCHES | |
#-d (cap deploy when check-in finished) | |
#-v (verbose, defaults to quiet) | |
#-m "commit message" (custom commit message) | |
#!/bin/bash | |
## options to be accepted | |
optstr=m:dv ## colon follows options that require an argument | |
while getopts $optstr var | |
do |
This file contains 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
=== Epic Snow Leopard Upgrayyyyd Guide === | |
Son, you’re now living in the land of 64-bit systems. | |
That means that some of your 32-bit shit is now broken. | |
Not all is lost. | |
== Fixing MySQL weirdness |
This file contains 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 | |
# -*- sh -*- | |
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home | |
export PATH=$JAVA_HOME/bin:$PATH | |
CLJ=$HOME/Projects/clj/clojure | |
java \ | |
-server \ |
This file contains 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
(ns examples.fs | |
(:import | |
(org.apache.log4j Level Logger) | |
(java.io BufferedReader InputStream InputStreamReader)) | |
(:use [clojure.contrib.test-is :only (deftest is)]) | |
(:use [clojure.contrib.except :only (throwf throw-arg)]) | |
(:require [clojure.contrib.duck-streams :as ds] | |
[examples.imports :as import])) |
This file contains 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
(ns examples.fs | |
(:import | |
(org.apache.log4j Level Logger) | |
(java.io BufferedReader InputStream InputStreamReader)) | |
(:use [clojure.contrib.test-is :only (deftest is)]) | |
(:use [clojure.contrib.except :only (throwf throw-arg)]) | |
(:require [clojure.contrib.duck-streams :as ds] | |
[examples.imports :as import])) |
OlderNewer