Skip to content

Instantly share code, notes, and snippets.

View heroicyang's full-sized avatar
🎯
Focusing

Heroic Yang heroicyang

🎯
Focusing
View GitHub Profile
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@heroicyang
heroicyang / gulpfile.js
Created July 25, 2014 02:08
Browserify task
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var watchify = require('watchify');
gulp.task('setWatch', function() {
global.isWatching = true;
});
gulp.task('browserify', function() {
@heroicyang
heroicyang / express-fileuploader-intro.md
Created January 3, 2014 15:25
express-fileuploader 简介

这是我在开发 nodediscuss 的过程中实现的,现在单独拆分出来作为一个库,方便有文件上传需求的同学们。

GitHub: https://github.com/heroicyang/express-fileuploader

特性

  • 在上传成功之后自动删除临时文件(原因请参见这里
  • 不负责 multipart 解析,你可以自由选择 multipart parser
  • 插件式,可插拔
  • 可根据自己的需求自定义上传逻辑(Strategy),比如将文件上传至 Dropbox
@heroicyang
heroicyang / ybjxbf.json
Created October 30, 2013 05:02
我的“眼不见心不烦”配置
{"whiteKeywords":[],"blackKeywords":[],"grayKeywords":[],"URLKeywords":[],"sourceKeywords":[],"sourceGrayKeywords":[],"userBlacklist":["1706976420"],"tipBackColor":"#FFD0D0","tipTextColor":"#FF8080","readerModeIndex":false,"readerModeProfile":false,"readerModeWidth":"750","readerModeBackColor":"rgba(100%, 100%, 100%, 0.8)","mergeSidebars":true,"floatSidebar":true,"unwrapText":true,"directBigImg":true,"directFeeds":false,"showAllGroups":true,"showAllMsgNav":true,"noDefaultFwd":true,"noDefaultGroupPub":true,"clearDefTopic":true,"overrideMyBack":false,"overrideOtherBack":false,"backColor":"rgba(100%, 100%, 100%, 0.2)","overrideMySkin":false,"overrideOtherSkin":false,"skinID":"skinvip001","filterOthersOnly":true,"filterPaused":false,"filterSmiley":false,"filterPromotions":true,"filterDeleted":true,"filterFeelings":true,"filterTaobao":false,"filterDupFwd":false,"maxDupFwd":"1","filterFlood":false,"maxFlood":"5","updateNotify":true,"autoSync":true,"floatBtn":true,"useCustomStyles":true,"customStyles":".WB_global_na
@heroicyang
heroicyang / speed-dial-2-setting.json
Last active December 23, 2017 17:16
Speed Dial 2 Setting
{
"groups": {},
"dials": {
"0": {
"id": 1,
"title": "Twitter",
"url": "https://twitter.com/",
"thumbnail": "",
"ts_created": 1381809640,
"visits": 18,
@heroicyang
heroicyang / open_chrome.sh
Created October 11, 2013 03:15
Chrome 30.0.1599.69 for Mac 崩溃解决办法
# 终端中输入下面命令来打开 Chrome
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --winhttp-proxy-resolver
@heroicyang
heroicyang / ios_resources.json
Created October 9, 2013 02:33
GitHub 上的 iOS 开源项目
var githubList = [
{
name:'系统基础库',
list: [
{name:'Category/Util',
list: [
{name:'sstoolkit', owner:'soffes', desc:'一套Category类型的库,附带很多自定义控件 功能不错~'},
{name:'BlocksKit', owner:'pandamonia', desc:'将Block风格带入UIKit和Founcation'},
{name:'cocoa-helpers', owner:'enormego', desc:'一些Cocoa的扩展 2年前的工程'},
@heroicyang
heroicyang / jshint_options.json
Created June 24, 2013 03:42
My jshint options
"jshint_options":
{
"bitwise": false,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"indent": 2,
"plusplus": true,
"undef": true,
"unused": true,
@heroicyang
heroicyang / handlebars.debugHelper.js
Created June 19, 2013 04:00
Handlebars调试技巧:增加如下helper之后,在模板文件里使用{{debug}}或是{{debug someValue}}即可
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");
console.log(this);
if (optionalValue) {
console.log("Value");
console.log("====================");
console.log(optionalValue);
}
});
@heroicyang
heroicyang / test.js
Created May 26, 2013 04:32
“清华大学一名男生给女生写的明信片”之Node解码版
var _ = require('underscore')
, iconv = require('iconv-lite');
var codes = [214,247,210,170,190,205,202,199,207,235,202,212,202,212,184,248,212,219,195,199,188,196,208,197,202,177,181,216,214,183,191,201,210,212,208,180,181,195,182,224,188,242,194,212,161,173,161,173];
var str = _.map(codes, function (code) {
return String.fromCharCode(code);
}).join('');
console.log(iconv.decode(new Buffer(str, 'ascii'), 'gbk'));