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 | |
# Update your wallpapager regularly. | |
# Preferrably installing it in your crontab: | |
# | |
# (crontab -l | sed '1,3d'; echo "# Update wallpager every half an hour."; echo "0,30 * * * * /path/to/wallpaper.sh") | crontab - | |
# | |
# by Jerry Fleming <[email protected]> | |
# on 2013-03-25. | |
# No rights reserved. Use at your own risk. |
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/python | |
# Zen of Python, Chinese Ultimate Final Version | |
# by Jerry Fleming <[email protected]> at 2012-12-14 | |
# No right reserved. Use at your own risk! | |
s = ''' | |
x\x9cM\x90\xdbO\xc20\x18\xc5\xdf\xf9\xff\xff\x012%\x88K\x84\xb2\xb1Kwc\x9dv+\x17 | |
g\xbb\x0b!\xd3\xe0D\xf0Ax\x00SHp\x89mb\xa2O\xcd\xef\xf4\x9c\xef\xebi\x8b\xdd\xa3 | |
\x80\\\xb1\xe5\xf0\x18\xf6\xdaJ\x0b\x9d\xc6\x13\x89\xf0%Q\x05:\x07w%\xd1\xd42&P | |
\x1e\x12\xc7\x1f!\x15\xf8\xe0\x16\x03\x89x4-e\xb6r\xee$\xba_Z.\xd0OF\xe34\xb3 |
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/python3 | |
# Export SMS from you Android phones into HTML, friendly for webkit browsers (Chrome/Safari). | |
# This requires SL4A <https://code.google.com/p/android-scripting/> | |
# and Python3 <https://code.google.com/p/python-for-android/wiki/Python3>. | |
# by Jerry Fleming <[email protected]> on 2013-03-25. | |
# No rights reserved. Use at your own risk. | |
import sqlite3 | |
import datetime | |
import re |
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/python3 | |
# Format your phone book in Chinese locale. | |
# This requires SL4A <https://code.google.com/p/android-scripting/> | |
# and Python3 <https://code.google.com/p/python-for-android/wiki/Python3>. | |
# by Jerry Fleming <[email protected]> on 2013-03-25. | |
# No rights reserved. Use at your own risk. | |
import sqlite3 | |
import re |
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 | |
# Backup android device to make ROMs, typically | |
# for Galaxy Tab P1000. | |
# by Jerry Fleming <[email protected]> | |
# | |
# SYNOPSIS: | |
# backup -- does everything | |
# backup file -- start from here directly | |
# backup file only -- for this file only |
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/busybox sh | |
# Init for initram. | |
# by Jerry Fleming <[email protected]> on 2013-03-25. | |
# No rights reserved. Use at your own risk. | |
# utility functions {{{ | |
rescue_shell() | |
{ | |
echo "Something went wrong. Dropping you to a shell." | |
echo "Please switch root manually." |
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 | |
# Shutdown the system, with GUI confirm box. | |
# by Jerry Fleming <[email protected]>, | |
# on Jun 7, 2013, | |
# improved on Dec 20, 2013, for systemd compatibility. | |
# Use at your own risks! | |
TIME=3 # Three minutes count down. | |
PATH=$PATH:/sbin # For the shutdown command to be found. | |
TITLE='Shutdown Confirm' |
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/python | |
# coding: utf8 | |
# vim: ts=4 sts=4 fdm=marker | |
''' | |
%s <action> [option] | |
where action is: | |
update [force]: update dns. | |
generate [filter]: generate (filtered) dns record list for update. | |
''' |
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/python | |
# coding: utf-8 | |
import sqlite3 as sqlite | |
import os.path | |
import struct | |
import re | |
from binascii import hexlify | |
PIN = re.compile(r'[ ]*[^ ]+(经卷|品)第[一二三四五六七八九十百千万]+($|\(|之)', re.U) |
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/python | |
# coding: utf8 | |
def c(color): | |
print "\x1b[0m\x1b[38;5;%sm█\x1b[1m█" % color, | |
print "System colors:" | |
for color in range(8): | |
c(color) | |
print "\x1b[0m" |
OlderNewer