This file contains hidden or 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
import subprocess | |
import glob | |
import sys | |
import os | |
import csv | |
import time | |
import gzip | |
import json | |
import re |
This file contains hidden or 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
import re | |
import sys | |
import urlparse | |
import urllib | |
def fb_normalize(url): | |
(scheme, netloc, path, params, query, fragment) = urlparse.urlparse(url) | |
q = urlparse.parse_qs(query) | |
if scheme == 'http': |
This file contains hidden or 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
.if !empty(.CURDIR:M/usr/ports*) && exists(/usr/local/libexec/portconf) | |
_PORTCONF!=/usr/local/libexec/portconf; echo | |
.for i in ${_PORTCONF:S/|/ /g} | |
${i:C,=.*,,g} = ${i:C,.*=%*,,:S,%, ,g} | |
.endfor | |
.endif |
This file contains hidden or 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
1. postgresql | |
install /usr/ports/databases/postgresql93-server/ | |
# p.s. I haven't applied following patch. | |
# http://www.freebsd.org/cgi/query-pr.cgi?pr=175783 | |
2. plv8js | |
git clone https://code.google.com/p/plv8js/ | |
cd plv8js | |
gmake CUSTOM_CC=g++46 # if failed, reinstall gcc46 | |
gmake CUSTOM_CC=g++46 install |
This file contains hidden or 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
""" | |
run: pack unpack diff | |
pack: | |
python pack.py pack > strokes.bin | |
gzip -kf strokes.bin | |
ls -l strokes.bin* | |
unpack: | |
gzip -dc < strokes.bin.gz | python pack.py unpack > strokes.unpacked |