Skip to content

Instantly share code, notes, and snippets.

View mockee's full-sized avatar

Yan Shi mockee

View GitHub Profile
@mockee
mockee / check_ctrip_price.js
Created May 5, 2012 15:18
Check the price of Ctrip tourism product
var http = require('http'),
jsdom = require('jsdom'),
nodemailer = require('nodemailer');
smtpTransport = nodemailer.createTransport('SMTP', {
service: 'Gmail',
auth: {
user: 'username@gmail.com',
pass: 'password'
}
@mockee
mockee / gist:2213952
Created March 27, 2012 08:20
Display vertical scrollbar on Firefox fullscreen mode
:-moz-full-screen html,
:-moz-full-screen body,
html:-moz-full-screen,
body:-moz-full-screen {
overflow-y: auto
}
@mockee
mockee / gist:875733
Created March 18, 2011 07:29
node 0.4.2 compile error
DEST_OS: darwin
DEST_CPU: x64
Parallel Jobs: 1
Product type: program
[73/75] cxx: src/platform_darwin.cc -> build/default/src/platform_darwin_4.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=0 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/v8/include -I../deps/v8/include -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/darwin-x64 -I../deps/c-ares/darwin-x64 -Ideps/v8/include ../src/platform_darwin.cc -c -o default/src/platform_darwin_4.o
../src/platform_darwin.cc:213: error: expected constructor, destructor, or type conversion before ‘<’ token
Waf: Leaving directory `/Users/mockee/Sites/nodeProjects/node/b
@mockee
mockee / 0_reuse_code.js
Last active September 8, 2015 08:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mockee
mockee / ghost_0.5.2_qiniu.js
Created October 4, 2014 07:23
Qiniu storage for Ghost 0.5.2
// # Local File System Image Storage module
// The (default) module for storing images, using the local file system
var express = require('express'),
fs = require('fs-extra'),
path = require('path'),
util = require('util'),
Promise = require('bluebird'),
errors = require('../errors'),
config = require('../config'),