Skip to content

Instantly share code, notes, and snippets.

View clvrobj's full-sized avatar

Chi Zhang clvrobj

  • Singapore, Singapore
View GitHub Profile
@clvrobj
clvrobj / l2tp.sh
Created January 21, 2012 12:58
l2tp.sh
#!/bin/bash
VPN_SERVICENAME="l2tpd"
VPN_PSK="fuckgfw"
VPN_IPRANGE="10.1.100"
VPN_USERNAME="fill in your username"
VPN_PASSWORD="your password"
#L2TPD/IPSEC
@clvrobj
clvrobj / douban.com.js
Created October 28, 2011 08:05
douban.com dotjs plugin
// 2012 new version
// 点击logo到广播
$('.site-nav-logo a').attr('href', 'http://www.douban.com/update/');
// 按"."刷新广播,与twitter快捷键一致
$('body').keypress(
function (e) {
var code = e.charCode ? e.charCode : e.keyCode;
if (code === 46 && !$(':focus').is(':input')) {
// '.' to reload
@clvrobj
clvrobj / suds.js
Created July 31, 2011 04:03
Added header related properties to suds.js in Titanium KitchenSink
/**
* Suds: A Lightweight JavaScript SOAP Client
* Copyright: 2009 Kevin Whinnery (http://www.kevinwhinnery.com)
* License: http://www.apache.org/licenses/LICENSE-2.0.html
* Source: http://github.com/kwhinnery/Suds
*/
function SudsClient(_options) {
function isBrowserEnvironment() {
try {
if (window && window.navigator) {