Skip to content

Instantly share code, notes, and snippets.

View Kimtaro's full-sized avatar

Kim Ahlström Kimtaro

View GitHub Profile
@Kimtaro
Kimtaro / gist:267318
Created January 2, 2010 00:25 — forked from pat/gist:246154
# So, with some help (and perhaps some faulty testing on my part initially) here
# is a solution I'm happy with.
def sphinx_version
# STDERR redirection for Unix
stderr = $stderr.dup
read, write = IO.pipe
$stderr.reopen(write)
`indexer`[/^Sphinx (\d\.\d\.\d)/, 1]
rescue # This catches errors for Windows
@Kimtaro
Kimtaro / phones.rb
Created February 5, 2009 01:54 — forked from mattt/phones.rb
# 'r' after open-mid central unrounded?
module Keats
module Phones
IPA_CONSONANTS = {
"B" => "b", # b - Lower-case B <be> voiced bilabial plosive
"CH" => "t\312\203", # tʃ - T-Esh ligature <cheese> voiceless postalveolar affricate
"D" => "d", # d - Lower-case D <dee> voiced dental or alveolar plosive
"DH" => "\303\260", # ð - Eth <thee> voiced dental fricative
"F" => "f", # f - Lower-case F <fee> voiceless labiodental fricative