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
all:commonprefix | |
clean: | |
rm *.o urlchanger | |
CC=clang | |
CFLAGS+=-O0 -g | |
CXXFLAGS+=-O0 -g |
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 <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <arpa/inet.h> | |
#include <net/if.h> | |
#include <sys/ioctl.h> | |
#include <net/if_dl.h> | |
#include <net/if_types.h> |
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
/* | |
* blueutil | |
* Command-line utility to control Bluetooth. | |
* Uses private API from IOBluetooth framework (i.e. IOBluetoothPreference*()). | |
* http://www.frederikseiffert.de/blueutil | |
* | |
* This software is public domain. It is provided without any warranty whatsoever, | |
* and may be modified or used without attribution. | |
* | |
* Written by Frederik Seiffert <ego@frederikseiffert.de> |
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=utf-8 | |
import struct | |
import sys | |
fp = open(sys.argv[1], 'rb') | |
data = fp.read() | |
pcap_header = {} |
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
#zz from http://www.exonsoft.com/~kochin/TinyP2P/tinyp2p.html | |
# tinyp2p.py 1.0 (documentation at http://freedom-to-tinker.com/tinyp2p.html) | |
# (C) 2004, E.W. Felten | |
# license: http://creativecommons.org/licenses/by-nc-sa/2.0 | |
# Annotated by Kochin Chang, Jan. 2005 | |
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 sys, os, time, atexit | |
from signal import SIGTERM | |
class Daemon: | |
""" | |
A generic daemon class. | |
Usage: subclass the Daemon class and override the run() method |
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
in AndroidManifest.xml (application-part): | |
<receiver android:enabled="true" android:name=".BootUpReceiver" | |
android:permission="android.permission.RECEIVE_BOOT_COMPLETED"> | |
<intent-filter> | |
<action android:name="android.intent.action.BOOT_COMPLETED" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
</intent-filter> | |
</receiver> |
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 <stdio.h> | |
#include <stdlib.h> | |
/* The following include files for the network interface. */ | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <ifaddrs.h> | |
#include <net/if.h> | |
#include <net/if_dl.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> |
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
\documentclass[a4paper, 12pt]{book} | |
\usepackage[colorlinks,linkcolor=blue,anchorcolor=blue,citecolor=green,CJKbookmarks=true]{hyperref} | |
\usepackage{fontspec,xltxtra,xunicode} | |
\usepackage{xeCJK} | |
\setCJKmainfont[BoldFont={STHeiti},ItalicFont={STKaiti}]{STSong} | |
\setmainfont{Times New Roman} | |
\setCJKsansfont[BoldFont={STHeiti}]{STXihei} | |
\setsansfont{Helvetica} | |
\setCJKmonofont{STFangsong} | |
\setmonofont{Courier New} |
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
LDFLAGS = -framework IOKit -framework ApplicationServices | |
test: test.m |
OlderNewer