View test.js
var foo = 0, bar = 0
process.nextTick(function() {
debugger
})
// 通过 node debug 进入 debugger,在 repl 中打印无论 foo 还是 bar 都会报错,ReferenceError: foo is not defined。
var foo = 0, bar = 0
process.nextTick(function() {
console.log(foo)
View nodejs_discovery_1.md

node.js 0.1.14 components

  • libeio, fs
  • libev, eventloop
  • v8, javascript engine
  • node, libraries and glue

entry function, main()

View xiami.pac
var _http_map = {
'white': {
'any': []
},
'proxy': {
'any': [
/^[^/]*\.dpool\.sina\.com\.cn\/iplookup/i,
/^[^/]*\/vrs_flash\.action/i
],
'v.youku.com': [
View install.sh
#!/bin/sh
# wget http://ftpmirror.gnu.org/binutils/binutils-2.21.1.tar.bz2
# wget http://ftpmirror.gnu.org/gcc/gcc-4.5.1/gcc-core-4.5.1.tar.bz2
# wget http://ftpmirror.gnu.org/gdb/gdb-6.8a.tar.gz
cd binutils-2.21.1
./configure --target=i386-jos-elf --disable-nls
make -j4
View essay_downloader.py
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import re
from bs4 import BeautifulSoup
from urlparse import urljoin
import requests
import requesocks as requests_socks
session = requests_socks.session()
View bupt_score.py
#! -*- encoding:utf-8 -*-
#!/usr/bin/env python
from bs4 import BeautifulSoup
import requests
import envelopes
import time
DEBUG = False