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 | |
# a telnet-like command to debug text protocols over SSL (https, smtps...). | |
# usage: | |
# telnets example.com https | |
# telnets example.com:https | |
# telnets https://example.com | |
if echo "$1" | grep -q "^[a-z]*://"; then |
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 | |
# from: | |
# http://i.imgur.com/7atJf.png | |
# http://www.reddit.com/r/offbeat/comments/dqtxn/a_friend_of_mine_postulates_that_if_you_stick_two/ | |
# | |
# available at http://namakajiri.net/misc/2awesome.py | |
import random | |
awesome = [ | |
'rocket', |
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 ruby1.8 | |
# Query Cambridge online dictionary for IPA pronunciation of English words. | |
# | |
# A tad slow and messy, but works (as of 2010-11-29). | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' |
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 | |
set -e | |
tmp="$(mktemp)" | |
dest="/usr/share/edict/edict.utf8" | |
function cleanup() | |
{ | |
rm -f "$tmp" | |
} |
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 | |
import locale | |
import curses as c | |
from curses.wrapper import wrapper | |
import random | |
locale.setlocale(locale.LC_ALL,'') | |
coding = locale.getpreferredencoding() | |
random.seed() | |
# more = use digits more often |
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 python2.6 | |
# -*- coding: utf-8 -*- | |
# TODO: doesn’t convert to id3v2; eyed3 and mutagen have been fussy | |
# with non-utf tags | |
# TODO: prints, prints everywhere | |
import sys | |
from ID3 import * |
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 | |
# http://xkcd.com/936/ | |
# http://namakajiri.net/misc/substantivos_pt.ascii | |
# TODO: getopt | |
# dict="/usr/share/dict/words" | |
# dict="/usr/share/dict/brazilian.utf8" | |
dict=/usr/local/share/dict/substantivos_pt.ascii |
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 | |
pname="$(basename $0)" | |
function usage() | |
{ | |
echo "Usage: $pname [OPTIONS] PATTERN [FILES and/or GREP_OPTIONS...] | |
Colorize all matches for PATTERN, an extended regular expression. | |
Non-matching lines are still printed. |
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 -e | |
sources='/usr/share/dict/american-english /usr/share/dict/brazilian' | |
function usage() | |
{ | |
echo "Script to find words that can be spelled in hexa. | |
Notice that this can make identifiers more vulnerable to discovery. | |
By default, this uses English and Brazilian wordlists; edit the script | |
header if this is undesirable. Works better if uni2ascii is installed. |
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 python2.6 | |
# -*- coding: utf-8 -*- | |
from datetime import * | |
import argparse | |
import sys | |
# this script has no actual code to calculate retrograde motion. sorry! | |
CSI = '[' |
OlderNewer