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
a.js:2b.js run from a | |
c.js:2I'm D | |
c.js:2d.js run from c | |
c.js:1c.js run from async c |
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
; The entire ECMAScript grammar expressed as a single PEG | |
; Parser rules which share a name with ECMA-262 productions are intended to match the same language. | |
Program ← | |
(S? (Statement / FunctionDeclaration))* S? | |
FunctionBody ← | |
(S? (Statement / FunctionDeclaration))* S? |
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
basename `find . -path '*/.svn*' -prune -o -print` | awk -F . '{print $NF}' | sort | uniq -c | sort |
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
#!/bin/sh | |
# modified from http://tinsuke.wordpress.com/2011/02/17/how-to-cross-compiling-libraries-for-ios-armv6armv7i386/ | |
GLOBAL_OUTDIR="`pwd`/dependencies" | |
OUTDIR="./outdir" | |
LEPTON_LIB="`pwd`/leptonlib-1.67" | |
TESSERACT_LIB="`pwd`/tesseract-3.01" | |
IOS_BASE_SDK="5.1" | |
IOS_DEPLOY_TGT="4.1" |
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
tell application "System Events" | |
tell process "SystemUIServer" | |
tell menu bar 1 | |
set menuExtras to (value of attribute "AXChildren") | |
set wifi to -1 | |
repeat with wifiMenu in menuExtras | |
tell wifiMenu | |
if value of attribute "AXDescription" contains "Wi-Fi" then | |
set wifi to wifiMenu | |
exit repeat |
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
; http://boshi.inimino.org/3box/asof/1270029991384/PEG/ECMAScript_unified.peg | |
; The entire ECMAScript grammar expressed as a single PEG | |
; Parser rules which share a name with ECMA-262 productions are intended to match the same language. | |
Program ← | |
(S? (Statement / FunctionDeclaration))* S? | |
FunctionBody ← |
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
curl -sLk --user {username}:{password} https://github.com/{username}/{repo}/tarball/{tagname} | tar -xzf - |
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
var http = require('http'); | |
var url = require('url'); | |
var _ = require('underscore'); | |
var util = require('util'); | |
var base = 'http://huaban.com/boards/'; | |
var huaban = function(board) { | |
var self = this; | |
self.max = ''; |
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
// npm install iconv | |
var gbk2utf8 = new (require('iconv').Iconv)('GBK', 'UTF8'); | |
function gbkUriDecode(content) { | |
return content.replace(/%(\w\w)%(\w\w)/g, function(source, g1, g2) { | |
return gbk2utf8(new Buffer(g1 + g2, 'hex')).toString(); | |
}); | |
}; |
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
// vim: set ts=2 sw=2: | |
var express = require('express'); | |
var http = require('http'); | |
var url = require('url'); | |
var xml2json = require('xml2json'); | |
var slideshare = require('./slideshare'); | |
var app = express.createServer(); |