This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ------------------------------ | |
" Name: vimrc for windows | |
" Author: keelii | |
" Email: [email protected] | |
" ------------------------------ | |
" Startup {{{ | |
filetype indent plugin on | |
augroup vimrcEx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ------------------------------ | |
" Name: vimrc for windows | |
" Author: keelii | |
" Email: [email protected] | |
" ------------------------------ | |
" Startup {{{ | |
filetype indent plugin on | |
augroup vimrcEx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var spritesmith = require('gulp.spritesmith'); | |
var imageminPngquant = require('imagemin-pngquant'); | |
var buffer = require('vinyl-buffer'); | |
var rename = require("gulp-rename"); | |
module.exports = function (config) { | |
var sprite = config.sprite; | |
return function (cb) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = require('webpage').create(); | |
var system = require('system'); | |
page.settings.userAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"; | |
page.viewportSize = { width: 1280, height: 800}; | |
if (system.args.length === 1) { | |
console.log('Usage: browser_screenshots.js <some URL>'); | |
phantom.exit(1); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function inSomeWeek(ts, n) { | |
var now = new Date(); | |
now.setHours(0); | |
now.setMinutes(0); | |
now.setSeconds(0); | |
var nowTS = now.getTime(); | |
var nowDay = getWeekNum(now.getDay()); | |
function getWeekNum(week) { | |
return week === 0 ? 7 : week; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function nWeekFromNow(ts) { | |
var now = new Date(); | |
now.setHours(0); | |
now.setMinutes(0); | |
now.setSeconds(0); | |
now.setMilliseconds(0); | |
var nowTS = now.getTime(); | |
var nowDay = now.getDay() || 7; | |
var startTS = nowTS - (nowDay - 1) * 24 * 60 * 60 * 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isCurrentWeek(ts) { | |
var now = new Date(); | |
now.setHours(0); | |
now.setMinutes(0); | |
now.setSeconds(0); | |
var nowTS = now.getTime(); | |
var nowDay = getWeekNum(now.getDay()); | |
function getWeekNum(week) { | |
return week === 0 ? 7 : week; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.9) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
/* 学习 Sass */ | |
/* 变量 */ | |
$font-yahei: "microsoft yahei"; | |
$main-color: #333; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* by @keelii */ | |
html, body, div, p, | |
h1, h2, h3, h4, h5, h6, | |
code, pre, | |
ul, ol, li | |
blockquote { | |
margin:0; | |
padding:0; | |
font-family:inherit; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
我的 Mac 必装软件 | |
1. xcode | |
安装好 commend line tools 方便开发使用命令行 | |
2. iTerm2 + zsh | |
mac 上最好用的终端,全屏透明什么的用起来很不错 | |
3. Alfred | |
启动器,和spotlight一样,不过更强大,alt+space让你启动任何东西 |