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 ruby | |
require 'rubygems' | |
require 'grit' | |
include Grit | |
#Assume that the repo exists in some way or another, if not, create it. | |
if(FileTest.exists?('repo.git')) | |
repo = Repo.new('repo.git') | |
else | |
repo = Repo.init_bare('repo.git') | |
end |
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
# Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands: | |
require 'grit' | |
include Grit | |
gritty = Grit::Git.new('/tmp/filling-in') | |
gritty.clone({:quiet => false, :verbose => true, :progress => true, :branch => '37s'}, "git://github.com/cookbooks/cc-aws.git", "/tmp/cc-aws2") | |
# => "Initialized empty Git repository in /tmp/cc-aws2/.git/\n" | |
Dir.entries('/tmp/cc-aws2').size | |
#wellp. |
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
var http = require('http'); | |
var sys = require('util'); | |
http.createServer(function (request, response) { | |
data = ""; | |
useSecl = false; | |
url = request.url; | |
transURI = "http://translate.google.com"; | |
if (url.indexOf(transURI) > -1) { | |
e = url.replace(transURI, ""); | |
http.get({ |
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
<?php | |
$file = $_GET['file']; | |
$data = $_POST['data']; | |
$data = base64_decode($data); | |
$fh = fopen($file, 'w') or die("false"); | |
fwrite($fh, $data); | |
fclose($fh); | |
echo "true"; | |
?> |
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 | |
#Okay, Do local stuff to get GD going... | |
echo "Beginning Ubunutu-Like only step. Any following command not found errors may not be of any concern." | |
sudo apt-get install libgd-gd2-perl | |
echo "Ubuntu-Like only step finished/passed." | |
wget http://circos.ca/distribution/circos-0.62.tgz | |
tar -xvf circos-0.62.tgz | |
cd circos-0.62 | |
cd bin | |
#Quick install of dependencies... |
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
import urllib2 | |
import io | |
import HTMLParser | |
defs = ["Genotype", "Phenotype", "epistasis", "Co-dominance", "incomplete dominance", "autosomal", "dominant", "recessive", "prokaryote", "pleiotropy", "genetic pre-determinism", "Punnet square", "Gregor Mendel", "sexual dimorphism", "heterozygous", "homozygous", "allele"] | |
unef = [] | |
for i in defs: | |
try: | |
url = "http://www.google.com/dictionary/json?callback=dict_api.callbacks.id100&q=" + i + "&sl=en&tl=en&restrict=pr%2Cde&client=te" | |
json = urllib2.urlopen(url).read() | |
(true,false,null) = (True,False,None) |
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 xdg-open | |
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Terminal=false | |
Icon[en_US]=/home/team4014/st2/Icon/256x256/sublime_text.png | |
Name[en_US]=Sublime Text 2 | |
Exec="/home/team4014/st2/sublime_text" | |
Name=Sublime Text 2 |
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
#mainBar{ | |
background: rgb(203,203,203); /* Old browsers */ | |
background: -moz-linear-gradient(top, rgba(203,203,203,1) 0%, rgba(154,155,154,1) 100%); /* FF3.6+ */ | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(203,203,203,1)), color-stop(100%,rgba(154,155,154,1))); /* Chrome,Safari4+ */ | |
background: -webkit-linear-gradient(top, rgba(203,203,203,1) 0%,rgba(154,155,154,1) 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(top, rgba(203,203,203,1) 0%,rgba(154,155,154,1) 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(top, rgba(203,203,203,1) 0%,rgba(154,155,154,1) 100%); /* IE10+ */ | |
background: linear-gradient(to bottom, rgba(203,203,203,1) 0%,rgba(154,155,154,1) 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cbcbcb', endColorstr='#9a9b9a',GradientType=0 ); /* IE6-9 */ | |
} |
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
#There are 4 bases in DNA (ATGC) | |
#There are 4 combinations of 2 bits. | |
class String | |
def is_i? | |
!!(self =~ /^[-+]?[0-9]+$/) | |
end | |
end | |
puts "Autodetecting type of input..." | |
inp = ARGV[0] | |
if inp.is_i? |
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
require 'matrix' | |
def parseMatrixCols(matrixInput) | |
columnCount = (0..matrixInput.column_count-1) | |
colsWithBraces = [] | |
columnCount.each do |n| | |
proc = matrixInput.column(n) | |
if proc.include?(1) | |
colsWithBraces.push(n) |
OlderNewer