Skip to content

Instantly share code, notes, and snippets.

View maasha's full-sized avatar
💭
HackHackHack...

Martin Asser Hansen maasha

💭
HackHackHack...
View GitHub Profile
View authentication_pages_spec.rb
require 'spec_helper'
describe "AuthenticationPages" do
subject { page }
describe "authorization" do
describe "for non-signed-in users" do
let(:user) { FactoryGirl.create(:user) }
describe "when attempting to visit a protected page" do
View gist:4612174
#!/usr/bin/env ruby
class Cmd
def cat(file)
end
def grep(pattern)
end
end
@maasha
maasha / gist:4656341
Created January 28, 2013 15:21
QIIME 1.6 Installation notes.
View gist:4656341
QIIME-1.6.0 install
===================
Documentation: http://qiime.org/install/install.html
home = /home/maasha/
install = /home/maasha/install
prefix = /home/maasha/install/QIIME1.6/
source = /home/maasha/install/QIIME1.6/src/
bashrc = /home/maasha/install/QIIME1.6/bashrc
View gist:4657199
maasha@orsted:~$ print_qiime_config.py -t
System information
==================
Platform: linux2
Python version: 2.7.3 (default, Jan 28 2013, 09:50:08) [GCC 4.4.5]
Python executable: /disk/orsted/install/maasha/QIIME1.6/bin/python
Dependency versions
===================
View gist:4672102
maasha@mel:~$ mtr -r newton
HOST: mel.local Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.52.32.1 0.0% 10 0.6 0.6 0.5 0.7 0.0
2.|-- 192.38.100.193 0.0% 10 2.6 2.3 1.1 4.8 1.1
3.|-- life3-26.net.ku.dk 0.0% 10 2.3 2.5 1.1 6.3 1.5
4.|-- adm3-28.net.ku.dk 0.0% 10 1.2 2.3 1.2 3.9 0.9
5.|-- kua3-15.net.ku.dk 0.0% 10 1.5 2.0 1.1 2.8 0.6
6.|-- 172.20.120.17 0.0% 10 1.7 1.8 1.3 4.3 0.9
7.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
8.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
View gist:4672174
maasha@mel:~$ ssh -vv newton date 2>&1 | perl -MTime::HiRes -ne 'use Time::HiRes; $s=Time::HiRes::time(); print "$s.$ms $_"'
1359540642.5785. OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
1359540642.57853. debug1: Reading configuration data /Users/maasha/.ssh/config
1359540642.57854. debug1: Applying options for newton
1359540642.57854. debug1: Reading configuration data /etc/ssh_config
1359540642.57855. debug1: Applying options for *
1359540642.57855. debug2: ssh_connect: needpriv 0
1359540642.57856. debug1: Connecting to newton.binf.ku.dk [130.225.211.96] port 24222.
1359540642.57856. debug1: Connection established.
1359540642.57856. debug2: key_type_from_name: unknown key type '-----BEGIN'
View gist:4682930
#!/bin/bash
function run()
{
cmd=$1
if error=$($cmd); then
echo "OK"
else
echo "FAIL"
View gist:4683187
#!/usr/bin/env ruby -w
require 'pp'
File.open("tyt", "r") do |ios|
ios.each_line do |line|
line.chomp!
fields = line.split("\t")
View gist:4684011
# Function to run a command and handle errors.
function run()
{
local cmd=$@
log "INIT" $cmd
if error=$($cmd); then
log "OK" $cmd
echo_green "OK"
View gist:4690690
maasha@maxwell:~/data/qiime_tutorial-v1.5.0$ pick_otus_through_otu_table.py -i TEST/split_library_output/seqs.fna -o TEST/otus
Traceback (most recent call last):
File "/home/maasha/install/QIIME1.6/bin/pick_otus_through_otu_table.py", line 131, in <module>
main()
File "/home/maasha/install/QIIME1.6/bin/pick_otus_through_otu_table.py", line 128, in main
status_update_callback=status_update_callback)
File "/home/maasha/install/QIIME1.6/lib/python2.7/site-packages/qiime/workflow.py", line 471, in run_pick_otus_through_otu_table
close_logger_on_success=close_logger_on_success)
File "/home/maasha/install/QIIME1.6/lib/python2.7/site-packages/qiime/workflow.py", line 135, in call_commands_serially
raise WorkflowError, msg