Discover gists
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
type = "" | |
split_name.each { |s| type = s if s =~ /csfasta|ftc|txr|cy5|cy3|qual/ } | |
puts type |
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
type = "" | |
split_name.each { |s| type = s if s =~ /csfasta|ftc|txr|cy5|cy3|qual/ } | |
puts type |
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
test |
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
package flash.events { | |
public class EventDispatcher { | |
// This would actually dispatch event to captured/uncaptured listeners... | |
// Assume this and the rest of event dispatcher behave as you'd expect :) | |
private function _dispatch(event, captured:Boolean = false):void { | |
var listener:Function; | |
event.currentTarget = this; | |
if (captured) for each (listener in capturedListeners[event.type]) { | |
if (event.stoppedImmediatePropagation) break; | |
listener(event); |
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
* executing "cd /data/cims/releases/20080722212302; rake RAILS_ENV=production db:migrate" | |
servers: ["65.74.174.196"] | |
[65.74.174.196:8214] executing command | |
** [out :: 65.74.174.196:8214] (in /data/cims/releases/20080722212302) | |
** [out :: 65.74.174.196:8214] rake aborted! | |
** [out :: 65.74.174.196:8214] | |
** [out :: 65.74.174.196:8214] undefined method `require_gem' for main:Object | |
** [out :: 65.74.174.196:8214] | |
** [out :: 65.74.174.196:8214] /data/cims/releases/20080722212302/Rakefile:4 | |
** [out :: 65.74.174.196:8214] |
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
// Clearing floats without extra markup | |
// Based on How To Clear Floats Without Structural Markup by PiE | |
// [http://www.positioniseverything.net/easyclearing.html] | |
// From the official sass documentation. | |
=clearfix | |
display: inline-block | |
&:after | |
content: "." | |
display: block | |
height: 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
begin | |
$: << 'lib'; %w( rubygems rake/testtask rake/rdoctask rake/gempackagetask extensions/all | |
utilities/string utilities/symbol date).each { |dep| require dep } | |
rescue LoadError => e | |
if e.message == 'no such file to load -- extensions/all' | |
puts "Better do `rake setup` to get all the fancies you're missing" | |
puts | |
else | |
raise e | |
end |
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
# To test this out, call: | |
# (206) 357-6220 x33684 or | |
# sip:2063576220@vox4.cloudvox.com x33684 | |
default { | |
if calleridname != 'Not available' | |
name = calleridname | |
end | |
text = "Hello #{name}, I think you're calling from #{callerid}" |
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 python | |
# -*- coding: utf-8 -*- | |
from random import randrange | |
def fisher_yates_shuffle(unshuffled, shuffled): | |
""" | |
http://en.wikipedia.org/wiki/Fisher-Yates_shuffle#The_modern_algorithm | |
...but using recursion instead of counters | |
""" | |
if not unshuffled: return shuffled |
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
localhost - - [22/Jul/2008 15:37:01] code 501, message Unsupported method ('OPTIONS') | |
localhost - - [22/Jul/2008 15:37:01] "OPTIONS / HTTP/1.1" 501 - | |
localhost - - [22/Jul/2008 15:37:18] code 501, message Unsupported method ('OPTIONS') | |
localhost - - [22/Jul/2008 15:37:18] "OPTIONS / HTTP/1.1" 501 - | |
localhost - - [22/Jul/2008 15:37:27] code 501, message Unsupported method ('GET') | |
localhost - - [22/Jul/2008 15:37:27] "GET / HTTP/1.1" 501 - | |
localhost - - [22/Jul/2008 15:37:28] code 501, message Unsupported method ('GET') | |
localhost - - [22/Jul/2008 15:37:28] "GET /favicon.ico HTTP/1.1" 501 - | |
localhost - - [22/Jul/2008 15:37:49] code 501, message Unsupported method ('OPTIONS') | |
localhost - - [22/Jul/2008 15:37:49] "OPTIONS / HTTP/1.1" 501 - |