Skip to content

Instantly share code, notes, and snippets.

@telen
telen / README-Template.md
Created Apr 16, 2019 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.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

@telen
telen / capture.js
Created Sep 13, 2016 — forked from majodev/capture.js
Capture screenshots (png) from multiple sites with phantomjs
View capture.js
// 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 / beijing_personal_201310.dat
Last active Jun 14, 2016
使用python抓取北京/广州摇号网站公布结果,并解析pdf到文本 并写入数据库 写入oracle使用sqlldr命令导入 写入mysql则直接insert(好像太多的数据executemany执行不了,所以切成小块执行)
View beijing_personal_201310.dat
beijing,personal,201310,1,6998102285168,刘宇宸
beijing,personal,201310,2,5491100633292,王良
beijing,personal,201310,3,3446103258689,王墨
@telen
telen / node.js&express
Created Sep 20, 2012
Node.js(v0.9.1-pre) & express(3.0.0rc4) enable signed cookie and session
View node.js&express
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;