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
<?php | |
interface Eater | |
{ | |
public function eat(Food $food); | |
} | |
class Robot | |
{ | |
public function getDiagram() { |
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 | |
# | |
# Example usage: | |
# | |
# 1> $ cd github.com/anthonybishopric/gotcha | |
# 1> $ gat go test # begin listening to this directory | |
# | |
# 2> $ cd github.com/anthonybishopric/gotcha | |
# 2> $ touch README.md |
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
2014/03/19 18:45:24 Will register yahoo at :9999 | |
^\SIGQUIT: quit | |
PC=0x426da1 | |
runtime.notetsleepg(0x9e2d00, 0xffffffffffffffff) | |
/usr/local/go/src/pkg/runtime/lock_futex.c:190 +0x46 fp=0x7f2c3e9ebf48 | |
runtime.signal_recv(0x0) | |
/usr/local/go/src/pkg/runtime/sigqueue.goc:110 +0xe2 fp=0x7f2c3e9ebf70 | |
os/signal.loop() | |
/usr/local/go/src/pkg/os/signal/signal_unix.go:21 +0x1e fp=0x7f2c3e9ebfa0 |
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 | |
# | |
# USAGE: | |
# markdown2html foo.md > foo.html | |
# | |
# | |
import misaka | |
import argparse |
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 'optparse' | |
options = {source: File.expand_path("~/.profile-remote"), target: "~/.profile"} | |
OptionParser.new do |opts| | |
opts.banner = "Copy a .profile script to a machine for sshing to it.\nUsage: shush [options] host" | |
opts.on("-s", "--source SOURCE", "The source profile file. Default is ~/.profile-remote") do |s| | |
options[:source] = File.expand_path(s) |
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
<script type="text/javascript"> | |
var __RouteCurry = function(route){ | |
return function(options){ | |
var routeMod = route; | |
if (typeof options == "string" || typeof options == "number"){ | |
routeMod = routeMod.replace(/:[a-zA-Z0-9\_]+/,options); | |
} | |
else{ | |
for(key in options){ | |
routeMod = routeMod.replace(":"+key, options[key]); |
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
class You < Person | |
include Transportation | |
state_machine :wednesday_night, :initial => :no_plans do | |
before_transition :no_plans => :making_anthony_happy, :do => :come_to_dukegen_pitch_at_rocketspace! | |
end | |
def come_to_dukegen_pitch_at_rocketspace! |
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
module SegmenterHelper | |
def sentences(num_sentences, text) | |
@tactful_tokenizer ||= TactfulTokenizer::Model.new | |
result = @tactful_tokenizer.tokenize_text text | |
output = "" | |
0.upto([num_sentences, result.length].min - 1) do |i| | |
output << "#{result[i]} " | |
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
#! /usr/bin/env bash | |
# pip install -r Pygments | |
pygmentize -f terminal256 $1 2>/dev/null | |
if [ $? -ne 0 ] | |
then | |
cat $1 | |
fi |
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
#!/bin/bash | |
OIFS=$IFS | |
IFS=$'\n' | |
count=10 | |
if [ -n "$1" ]; then | |
count=$1 | |
fi |
OlderNewer