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
# steps required to run pfind and save the output | |
# 2010-07-10 | |
# | |
pfind $PROJECT | |
cd $PROJECT_DIR | |
update_caf | |
cat ./CAF/caf.raw | caf2clipped_fasta -fasta $PROJECT.fa |
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
# project euler problem 001 in rakudo | |
[+](1..^1000).grep({ $_ % any(3, 5) == 0 }) |
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
# what should happen when i assign the result of this function to: | |
# - an array | |
# - a hash | |
multi function ( Str $string, Int $times ) returns Array { gather for 1 .. $times { take $string } } | |
my @test = function( 'hi', 4 ); | |
my %test = function( 'hi', 4 ); |
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/env ruby | |
require 'rubygems' | |
require 'yaml' | |
require 'pp' | |
pp YAML.load_file( 'data.yml' )['development'] |
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/env perl | |
use 5.012; | |
use Test::Most; | |
{ | |
package Foo; | |
use Moose; | |
has bar => | |
( is => 'ro', isa => 'Str', required => 1 ); | |
around bar => sub { |
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 'rake' | |
desc 'load specific version of allele_image' | |
task :load_version, [ :file, :version ] do |task, args| | |
args.with_defaults( :version => '0.1.1' ) | |
raise 'Please provide input file' unless args[:file] | |
gem 'allele_image', "= #{ args[:version] }" | |
require 'allele_image' | |
AlleleImage::Image.new( args[:file] ).render.write( args[:file].gsub( /\.\w+$/, '.png' ) ) |
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
// make the escells.rest rows red navigating from the toggle | |
jQuery("a.escells_toggle").each( function () { | |
var escells = jQuery(this).parent().children("table").children("tbody.escells").children(); | |
// give it a background color | |
escells.slice(2, escells.size()).css("background-color", "red"); | |
}); |
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
git svn clone -s $URL_TO_SVN_REPO repo_name | |
cd repo_name | |
git reset --hard remotes/trunk |
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/env ruby | |
# An example of how to use the genbank generating code from ruby | |
genbank = %x[perl -mHTGT::Utils::GenerateGenBankString=:all -e 'print generate_genbank_string(@ARGV)' #{ ARGV.join(' ') }] | |
puts genbank |
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 'getoptlong' | |
require 'pp' | |
@database = ENV["HTGT_ENV"] == 'Devel' ? 'development' : 'production' | |
@debug = false | |
@config_file = '/path/to/config.yml' | |
opts = GetoptLong.new( | |
[ '--pipeline', '-p', GetoptLong::REQUIRED_ARGUMENT ], |