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 | |
# colorize output of Linux ip(8). suitable to replacement via alias (hopefully). | |
# expects GNU sed. | |
# | |
# expanded from: | |
# http://unix.stackexchange.com/questions/148/colorizing-your-terminal-and-shell-environment | |
IP_CMD=/bin/ip | |
NORMAL=`echo -e '\033[0m'` |
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 | |
# apt-get install sox | |
unset ans | |
tmp=$(mktemp).wav | |
while true; do | |
echo -n "Enter to start recording (Ctrl+C to finish), p to play again, q to quit... " | |
read ans | |
case "$ans" in | |
p) play $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
#!/bin/bash | |
# | |
# O "Vocabulário na Língua Brasílica", de 1621, é um dicionário jesuíta | |
# português/tupi antigo. Uma versão digital por Ensjo está disponível em | |
# http://vlb.wikispaces.com/ . | |
# | |
# Este script simples adapta a versão wiki para: | |
# 1. formato texto .tsv, separado por tabs (bom para grep, cut e afins), e | |
# 2. formatos .index e .dict para o protocolo DICT (dictd, dict(1) etc.) | |
# |
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 = '[' |
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
#!/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 | |
# 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
#!/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
#!/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
#!/bin/bash | |
set -e | |
tmp="$(mktemp)" | |
dest="/usr/share/edict/edict.utf8" | |
function cleanup() | |
{ | |
rm -f "$tmp" | |
} |