Skip to content

Instantly share code, notes, and snippets.

View gettext-metabase.rb
class Gettext < Formula
desc "GNU internationalization (i18n) and localization (l10n) library"
homepage ""
url ""
mirror ""
sha256 "d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192"
license "GPL-3.0"
livecheck do
url :stable

Keybase proof

I hereby claim:

  • I am rlotun on github.
  • I am rlotun ( on keybase.
  • I have a public key whose fingerprint is 4CB0 73FC 79B0 2275 89C3 5689 FC13 4302 26B9 AAE9

To claim this, I am signing this object:

rlotun /
Created May 16, 2011
Twisted Benchmark Example
""" A Twisted benchmark example. See:
from twisted.web import server, resource
class MainHandler(resource.Resource):
isLeaf = True
def render_GET(self, request):
rlotun /
Created Nov 30, 2010
Fizzbuzz in Python-land
for i in xrange(1, 101):
print ''.join(['fizz' if i % 3 == 0 else '', 'buzz' if i % 5 == 0 else '']) or i
# or simply:
print '\n'.join([''.join(['fizz' if i % 3 == 0 else '', 'buzz' if i % 5 == 0 else '']) or str(i) for i in xrange(1, 101)])
# command-line one liner foo:
python -c "print '\n'.join([''.join(['fizz' if i % 3 == 0 else '', 'buzz' if i % 5 == 0 else '']) or str(i) for i in xrange(1, 101)])"
#!/usr/bin/env python
usage = """usage: %prog [options] path1 path2 ...
diffstrings compares your primary locale with all your other locales to help you determine which new strings need to be translated. It outputs XML files which can be translated, and then merged back into your strings files.
The path arguments supplied to this script should be the path containing your source files. The file system will be searched to find the .lproj directories containing the Localizable.strings files that the script will read and write.
import os.path, codecs, optparse, re, datetime