Skip to content

Instantly share code, notes, and snippets.

@telen
telen / node.js&express
Created September 20, 2012 14:47
Node.js(v0.9.1-pre) & express(3.0.0rc4) enable signed cookie and session
Node.js & express enable signed cookie and session
app.use(express.cookieParser(‘telen’));
app.use(express.session());
response.cookie('name', 'value', {maxAge: 60000, signed: true});
request.signedCookies.name;
@telen
telen / beijing_personal_201310.dat
Last active June 14, 2016 14:43
使用python抓取北京/广州摇号网站公布结果,并解析pdf到文本 并写入数据库 写入oracle使用sqlldr命令导入 写入mysql则直接insert(好像太多的数据executemany执行不了,所以切成小块执行)
beijing,personal,201310,1,6998102285168,刘宇宸
beijing,personal,201310,2,5491100633292,王良
beijing,personal,201310,3,3446103258689,王墨
@telen
telen / capture.js
Created September 13, 2016 11:29 — forked from majodev/capture.js
Capture screenshots (png) from multiple sites with phantomjs
// How to: save as capture.js and run with "phantomjs capture.js"
// Setup by modifying URLS, PAGE_WIDTH AND PAGE_HEIGHT constants!
// Hint: set PAGE_WIDTH or PAGE_HEIGHT to 0 to capture full page!
// modified version of script at http://www.cameronjtinker.com/post/2011/09/26/Take-Screenshot-of-all-HTML-documents-in-a-folder-using-PhantomJS.aspx
var PAGE_WIDTH = 960;
var PAGE_HEIGHT = 640;
var URLS = [
"http://github.com",
@telen
telen / README-Template.md
Created April 16, 2019 06:37 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites