Skip to content

Instantly share code, notes, and snippets.

View carlcrott's full-sized avatar

Carl Crott carlcrott

  • <( '.' <) <( '.' )> (> '.' )>
  • San Francisco CA
View GitHub Profile
Code changes should only be pushed to github if all tests are green.
Below is a common work-flow for a team working with a central repo. several variations are possible, but if unsure, please go by this:
1. if you are working from a Pivotal Tracker story, click "start" on that story
2. git pull (or, if this is your first time ever getting the code, do git clone git@github.com:our_repo/our_repo.git to get a local copy of the repo)
3. rake db:migrate
4. rake db:test:prepare
5. spec spec
RVM .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
if [[ -n "$PS1" ]]; then
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
////////////////////////////The Error //////////////////////////////
unf-ubu@unf-ubu:~/rails_projects/crossbow$ ruby EMR_job.rb
http://crossbow-refs.s3.amazonaws.com/hg18.jar
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please report the following lines to:
s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$./cb_emr \
--name "Crossbow-HG18" \
--preprocess \
--input=s3n://bg-crossbow-01/example/human_g18/small.manifest \
--output=s3n://bg-crossbow-01/example/human_g18/output_full \
--reference=s3n://bg-crossbow-01/crossbow-refs/hg18.jar \
--instances 1
@carlcrott
carlcrott / models.py
Created February 8, 2012 15:23
sequence-api contents
from django.db import models
class Gene(models.Model):
sequence = models.CharField(max_length=500)
chromosome = models.CharField(max_length=10)
## Java
Oscar oscar = new Oscar();
List<ResolvedNamedEntity> entities = oscar.findAndResolveNamedEntities(s);
for (ResolvedNamedEntity ne : entities) {
System.out.println(ne.getSurface());
ChemicalStructure inchi = ne.getFirstChemicalStructure(FormatType.INCHI);
if (inchi != null) {
System.out.println(inchi);
}
thrive@thrive-laptop:~/rails_projects/sinatra-jruby-heroku$ git push heroku master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 646 bytes, done.
Total 6 (delta 3), reused 0 (delta 0)
-----> Heroku receiving push
-----> Java app detected
-----> Installing Maven 3.0.3..... done
# Example
1. Install Jruby ( I'm using RVM, which makes it painfully easy )
2. Trial
<pre>
$ rvm install jruby
$ rvm use jruby
</pre>
# composed of code from:
# http://whatcodecraves.com/articles/2008/02/05/setup_rails_with_postgresql/
# http://www.tokumine.com/2009/09/03/jruby-postgres-rails/
common: &common
adapter: jdbcpostgresql
username: oscar
password: XXXXX
host: 127.0.0.1
port: 5432
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>net.chowie</groupId>
<artifactId>jruby-heroku</artifactId>
<version>1.0</version>
<name>sinatra-jruby-heroku</name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>