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
module ColourfulPuts | |
def cprint(text, colour) | |
colours = { | |
:red => "\033[1;31m", | |
:yellow => "\033[1;31m", | |
:green => "\033[1;32m", | |
:blue => "\033[1;34m", | |
:magenta => "\033[1;35m", | |
:default => "\033[0m" | |
} |
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 | |
# translate text on the command line | |
require 'rubygems' | |
require 'open-uri' | |
require 'json' | |
# Usage: $0 from:to phrase... | |
# | |
# the first argument defines the languages to convert from and to. If only one |
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
# config/app_config.yml | |
--- | |
defaults: &defaults | |
:name: Super Awesome Blog | |
:tagline: My super awesome blog and stuff. | |
:email: [email protected] | |
development: | |
<<: *defaults | |
# Override the defaults. |
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
# Learning Cantonese using bastardised pinyin | |
# Cantonese pronunciation : English phrase | |
# | |
ng goi: please/thank you (in shops etc) | |
dor dze: thank you (someone has just done something nice for you) | |
ngaw seung...: I would like... | |
ngaw seung leung go bear-tzhao: I would like 2 beers. | |
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
1) Guilin - famous for landscape | |
2) X'ian | |
3) Zhang Jia Jie - Where Owen went |
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
1) Guilin - famous for landscape | |
2) X'ian | |
3) Zhang Jia Jie - Where Owen went |
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
Your origina | |
a a1 a2 a3 a4 a5 e e1 e2 e3 e4 e5 i i1 i2 i3 i4 i5 o o1 o2 o3 o4 o5 u u1 u2 u3 u4 u5 ü v1 v2 v3 v4 ü | |
Tonal pinyin: | |
a ā á ǎ à a e ē é ě è e i ī í ǐ ì i o ō ó ǒ ò o u ū ú ǔ ù u ü ǖ ǘ ǚ ǜ ü | |
a ā á ǎ à a e ē é ě è e i ī í ǐ ì i o ō ó ǒ ò o u ū ú ǔ ù u ü ǖ ǘ ǚ ǜ à |
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
Tones = { | |
1 => :flat, | |
2 => :up, | |
3 => :downup, | |
4 => :down, | |
5 => :notone, | |
} | |
# where v = umlaut | |
Vowels = [ |
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
# Built in library imports | |
import mimetypes | |
import re | |
import os | |
import sys | |
# Server imports | |
import urlparse | |
import cgi | |
class Juno(object): |
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 | |
# Originally by Mike Clark. | |
# | |
# From http://www.pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/StakingOutFileChanges.rdoc | |
# | |
# Runs a user-defined command when files are modified. | |
# | |
# Can use Ruby's Dir[] to get file glob. Quote your args to take advantage of this. | |
# |
OlderNewer