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 'sinatra' | |
# Set the version of the API being run here | |
# | |
MAJOR_VERSION = 1 | |
MINOR_VERSION = 0 | |
helpers do | |
def version_compatible?(nums) | |
return MAJOR_VERSION == nums[0].to_i && MINOR_VERSION >= nums[1].to_i |
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 'nokogiri' | |
require 'open-uri' | |
# Replace stupid 'smart' quotes in text, replace '\n' with real | |
# newlines, change selected diacritical marks | |
# | |
def cleaned(str) | |
str.gsub(/\\n/,"\n").gsub(/\‘|\’/, "'").gsub(/\”|\“/, '"').gsub(/í/, '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
require 'sinatra' | |
# Set the version of the API being run here | |
# | |
MAJOR_VERSION = 1 | |
MINOR_VERSION = 0 | |
VERSION_REGEX = %r{/api/v(\d)\.(\d)} | |
helpers do | |
def version_compatible?(nums) |
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
[user] | |
name = Your Name Here | |
email = Your Name Here | |
[diff] | |
[color] | |
ui = auto | |
[alias] | |
st = status | |
ci = commit | |
co = checkout |
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
(i=0; for vol in $(awk '{print $2}' vol_snaps.txt); do i=$((i+1)); ec2-attach-volume $vol -i i-aa3bc4c8 -d /dev/sdv${i}; done) |
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 'pony' | |
require 'zip/zip' | |
desc "Email the coverage to someone who gives a damn" | |
task :email_coverage do | |
archive = "test-coverage.zip" | |
Zip::ZipFile.open(archive, 'w') do |zipfile| | |
Dir["coverage/**/**"].reject{ |f| f == archive}.each do |file| | |
zipfile.add(file.sub('coverage/',''),file) |
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
get_git_branch() { | |
git branch | awk '/^\*/ { print $2 }' | |
} | |
get_git_dirty() { | |
git diff --quiet || echo '*' | |
} | |
get_git_prompt() { | |
git branch &> /dev/null || return 1 |
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 | |
files=`find . -name '*.tiff'` | |
for f in $files | |
do | |
dir=`dirname $f` | |
target=`basename -s .tiff $f` | |
convert $f -resize 865x585 ${dir}/${target}_865x585.png | |
echo ${dir}/${target}_865x585.png | |
done |
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
1982 Tandy Basic | |
1982 z80 Assembler | |
1983 MS Color Basic | |
1983 6809 Assembler | |
1985 Pascal | |
1985 DCL | |
1985 68000 Assembler | |
1986 C | |
1986 Modula 2 | |
1986 Ada |
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
THE KVIKKALKUL PROGRAMMING LANGUAGE | |
Note: this message contains top secret information of the Swedish Navy. | |
Possession of this information in Sweden can (and will in most cases) | |
lead to Capital Punishment. DO NOT DISTRIBUTE THIS INFORMATION | |
TO SWEDEN!!! | |
INTRODUCTION | |
When I worked for the Swedish Navy in 1957 as a programmer, my task was to |
OlderNewer