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 | |
""" Restart mDNSResponder if it's not responsible (just for MacOS) | |
Run this script as root via cron. | |
* * * * * /Users/xupeng/bin/check_mDNSResponder.py | |
""" | |
import os |
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 | |
""" | |
Utility script for setting access pattern of MySQL log files to recycle | |
buffer cache | |
""" | |
import os | |
import sys | |
import glob |
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
mencoder -o with-subtitle.mp4 -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -sub subtitle.srt -utf8 -subfont-text-scale 2 -font "STHeiti" movie.mov |
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 | |
mencoder -o with-subtitle.avi -ovc lavc -lavcopts mbd=2:trell=yes:v4mv=yes:vbitrate=16000 -oac copy -sub subtitle.srt -utf8 -subfont-text-scale 2 -overlapsub -font "STHeiti" movie.mov |
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
xupeng@homes ~ $ pgrep -fli agent | |
18815 /Library/ScriptingAdditions/SIMBL.osax/Contents/Resources/SIMBL Agent.app/Contents/MacOS/SIMBL Agent | |
16031 /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Resources/storeagent | |
15175 /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthAgent | |
15174 /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthSysAgent | |
901 /Applications/Day One.app/Contents/Library/LoginItems/Day One Agent.app/Contents/MacOS/Day One Agent -psn_0_241723 | |
887 /Library/Parallels/Parallels Service.app/Contents/PlugIns/Parallels Desktop Control Agent.app/Contents/MacOS/prl_deskctl_agent | |
884 /System/Library/CoreServices/AirPort Base Station Agent.app/Contents/MacOS/AirPort Base Station Agent -launchd -allowquit | |
876 /usr/libexec/warmd_agent | |
874 /Applications/iPhoto.app/Contents/Library/LoginItems/PhotoStreamAgent.app/Contents/MacOS/PhotoStreamAgent |
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
http://www.amazon.com/Freedom-TM-Daemon-ebook/dp/B002VUFKDY/ref=sr_1_3?s=digital-text&ie=UTF8&qid=1329465407&sr=1-3 | |
http://www.amazon.com/Daemon-ebook/dp/B003QP4NPE/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1329465407&sr=1-1 | |
http://itunes.apple.com/us/book/high-performance-mysql-second/id396901665?mt=11 | |
http://www.amazon.com/Understanding-MySQL-Internals-ebook/dp/B0043EWUIO/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1329465489&sr=1-1 | |
http://www.amazon.com/MySQL-Troubleshooting-What-Queries-ebook/dp/B0077F7T8W/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1329465550&sr=1-1 |
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
6in4 - 10-1 | |
6to4 - 7-1 | |
aria2 - 1.14.1-1 | |
at - 3.1.13-1 | |
base-files - 103-r30712 | |
base-files-network - 3 | |
bash - 4.2-2 | |
blkid - 1.42-1 | |
block-mount - 0.2.0-7 | |
bridge - 1.5-1 |
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 | |
#coding=utf8 | |
import os | |
from sqlite3 import dbapi2 as sqlite | |
def message_read(flags): | |
"""reimplementation of an sqlite user defined function called by a trigger | |
on the messages table. | |
the trigger checks the message flags to see if a message has been read to |
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
root@bazaar /root # free -m | |
total used free shared buffers | |
Mem: 126812 29844 96968 0 0 | |
-/+ buffers: 29844 96968 | |
Swap: 0 0 0 | |
root@bazaar /root # df -h | |
Filesystem Size Used Available Use% Mounted on | |
rootfs 30.6M 19.8M 10.8M 65% / | |
/dev/root 30.6M 19.8M 10.8M 65% / | |
tmpfs 61.9M 2.1M 59.8M 3% /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
// ==UserScript== | |
// @name Hide someone | |
// @description Hide someone | |
// @author Xupeng | |
// @include http://www.douban.com | |
// @version 1.0 | |
// ==/UserScript== | |
if (window.location.href == 'http://www.douban.com/') { | |
window.location.href = 'http://www.douban.com/update/'; |
OlderNewer