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
#include <objc/objc-runtime.h> | |
// from objc_runtime_new.h with some simplifications | |
#if __LP64__ | |
typedef uint32_t mask_t; | |
#define FAST_DATA_MASK 0x00007ffffffffff8UL | |
#else | |
typedef uint64_t mask_t; | |
#define FAST_DATA_MASK 0xfffffffcUL |
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 | |
# Convert files in Open Container Format from Traditional Chinese | |
# to Simplified Chinese. | |
import sys, os, zipfile, re, codecs, subprocess | |
from xml.dom import minidom | |
sys.stdout = codecs.getwriter('utf-8')(sys.stdout) | |
debug = True |
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/ruby | |
#Just run this script in a terminal window, leaving the window open in the | |
#background so it can continue to process messages. | |
IO.popen("syslog -F \'$(Sender): $Message\' -w -k Sender com.apple.backupd") { |syslogIO| | |
while (inputString = syslogIO.gets) do | |
escapedString = inputString.gsub("'", "\\'") | |
`/usr/local/bin/growlnotify -a 'Time Machine' -m '#{escapedString}'` | |
end | |
} |