Skip to content

Instantly share code, notes, and snippets.

View keelii's full-sized avatar
🎯
Focusing

kily zhou keelii

🎯
Focusing
View GitHub Profile
@keelii
keelii / vimrc
Created July 11, 2016 11:37
vimrc for ubuntu
" ------------------------------
" Name: vimrc for windows
" Author: keelii
" Email: [email protected]
" ------------------------------
" Startup {{{
filetype indent plugin on
augroup vimrcEx
@keelii
keelii / vimrc
Last active September 29, 2024 14:48
vimrc for window
" ------------------------------
" Name: vimrc for windows
" Author: keelii
" Email: [email protected]
" ------------------------------
" Startup {{{
filetype indent plugin on
augroup vimrcEx
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) {
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 {
@keelii
keelii / inSomeWeek
Created January 1, 2015 08:36
some in which week, last N week
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;
@keelii
keelii / nWeekFromNow
Last active August 29, 2015 14:12
how many weeks from now to sometime
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;
@keelii
keelii / isCurrentWeek
Created December 31, 2014 04:53
Javascript check if sometime is current week
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;
@keelii
keelii / SassMeister-input.scss
Created July 8, 2014 00:50
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// ----
/* 学习 Sass */
/* 变量 */
$font-yahei: "microsoft yahei";
$main-color: #333;
/* 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;
}
@keelii
keelii / mac app
Last active August 31, 2016 03:37
我的 Mac 必装软件
1. xcode
安装好 commend line tools 方便开发使用命令行
2. iTerm2 + zsh
mac 上最好用的终端,全屏透明什么的用起来很不错
3. Alfred
启动器,和spotlight一样,不过更强大,alt+space让你启动任何东西