Skip to content

Instantly share code, notes, and snippets.

View chihchun's full-sized avatar
🎯
Focusing

Rex Tsai chihchun

🎯
Focusing
View GitHub Profile
@chihchun
chihchun / libxmljs-test.js
Created March 10, 2010 15:29
test xpath of libxmljs
var sys = require('sys');
var libxml = require("./modules/libxmljs");
var doc = libxml.parseXmlString("<html><head><link rel='alternate' title='rss' href='rss' /></head><body><link rel='alternate' title='foo' href='bar' /></body></html>");
var elems = doc.get ('//head');
elems = elems.find('.//link');
for (var i in elems) {
sys.puts(elems[i].path());
sys.puts(elems[i]);
}
#!/bin/sh
# Copyright (c) 2010 Rex Tsai <chihchun@kalug.linux.org.tw>
#
# Description
# * Setup wlan0 as ad-hoc interface
# * make eth0 as gateway, change it if you like to use other inteface like ppp0
#
# INIC
# ONIC
WLAN=wlan0
#!/bin/sh
# Rex Tsai <chihchun@kalug.linux.org.tw>
BKDIR=/media/backup/backup
KEY=DC76FEB9
# OP=incremental
# OP=full
# OP=collection-status
# OP=cleanup
# OP="remove-older-than time"
@chihchun
chihchun / gist:672124
Created November 11, 2010 06:51
madbutterfly crashes, there is no draw method in animate
Unknown style: fill-opacity
Unknown style: fill-opacity
Unknown style: fill-opacity
Unknown style: fill-opacity
Unknown style: fill-opacity
Unknown style: fill-opacity
Unknown style: fill-opacity
Unknown style: fill-opacity
Unknown style: fill-opacity
Unknown style: stroke
ibus (1.3.7-1ubuntu4) maverick-proposed; urgency=low
[ Karl Lattimer ]
* debia/patches/05_appindicator.patch
- Fixed unresponsive menu, (LP: #645724)
- Fixed 100% cpu usage properly, (LP: #637671)
- Fixed focus tracking issue, (LP: #522079)
[ Ikuya Awashiro ]
* debian/patches/03_fix1104.patch: added.
* About to connect() to comet30.plurk.com port 80 (#0)
* Trying 74.120.121.62... * connected
* Connected to comet30.plurk.com (74.120.121.62) port 80 (#0)
> POST /comet?channel=generic-6978432-360196e187c8febba978e4cd9061883533285e5e&offset=0 HTTP/1.1
User-Agent: php-plurk-api agent
Host: comet30.plurk.com
Accept: */*
Cookie: plurkcookiea="XXX"
Content-Length: 8
Content-Type: application/x-www-form-urlencoded
@chihchun
chihchun / gist:753181
Created December 23, 2010 16:08
NextVOD
壹多媒體娛樂服務股份有限公司 壹網樂/網樂通, https://www.nextvod.com.tw/ #nextvod #nextv
H/W
STMicroelectronics STx7105 (Renesas SuperH Core)
VIA VT6113 (Ethernet)
NANYA NT5TU64M16GG-AC (DRAM DDR2 64Mx16 PC800 BGA) * 2
Samsung NCDOM08GMS-MLC (USB DOM 8GB)
Winbond 25Q80 1MB Spi Flash (Onboard Flash)
Console Pin headers
@chihchun
chihchun / gist:754972
Created December 25, 2010 17:59
Debian on NextVOD STB
sh-4.1# uname -a
Linux (none) 2.6.23.17_stm23_A18B-PDK7105-32BITS-A18B #3 PREEMPT Mon Nov 8 14:21:27 CST 2010 sh4 GNU/Linux
sh-4.1# cat /proc/cpuinfo
machine : pdk7105
processor : 0
cpu family : sh4
cpu type : STx7105
cut : 3.x
cpu flags : fpu icbi synco fpchg
cache type : split (harvard)
@chihchun
chihchun / kermit.sh
Last active September 24, 2015 14:47
#!/bin/sh
# A script for access console and log the output.
# A script for access console and log the output.
# Usage:
# $ DEVICE=/dev/ttyUSB0 SPEED=51200 kermit.sh
#
# Copyright (c) Rex Tsai <chihchun@kalug.linux.org.tw>
# $Id: $
# SPEED=9600