Skip to content

Instantly share code, notes, and snippets.

View hfcorriez's full-sized avatar
🏠
Working from home

hfcorriez hfcorriez

🏠
Working from home
View GitHub Profile
@hfcorriez
hfcorriez / test.js
Created August 19, 2012 09:21
Simple Pub/Sub model with NodeJs+Mongoose
var mongoose = require('mongoose');
var db = mongoose.createConnection('127.0.0.1', 'test');
// Make schema
var schema = mongoose.Schema({ name: String });
// Create subscribers collection
var subscribers = [];
// Hook `save` post method
@hfcorriez
hfcorriez / killuwa.sh
Created August 6, 2012 02:50
OSX杀掉Adobe流氓更新程序
ps -ef | grep UWA | grep -v grep | awk '{print $2}' | xargs kill
@hfcorriez
hfcorriez / model.js
Created July 28, 2012 17:40
讨论JS风格
var _default_options = {
freezeTableName: true
, underscored: true
, charset: 'utf8'
, collate: 'utf8_general_ci'
};
@hfcorriez
hfcorriez / .vimrc
Created July 3, 2012 14:59
My Mac .vimrc
"======================================================================================
"General settings
"======================================================================================
syntax on
set expandtab
set guifont=Courier\ New\ 12
set guifontwide=STXihei:h14
"set guifont=Bitstream\ Vera\ Sans\ Mono:h14
"set nomacatsui
"set termencoding=macroman
@hfcorriez
hfcorriez / textStorage.js
Created June 14, 2012 06:01 — forked from sofish/textStorage.js
Cross-browser TextStorage Solution
/**
* @ NAME: Cross-browser TextStorage
* @ DESC: text storage solution for your pages
* @ COPY: sofish, http://sofish.de
*/
typeof window.localStorage == 'undefined' && ~function () {
var localStorage = window.localStorage = {},
prefix = 'data-userdata',
doc = document,