Skip to content

Instantly share code, notes, and snippets.

@aben
aben / .vimrc
Last active October 2, 2015 07:48
my vimrc
se nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
@aben
aben / console.js
Created March 31, 2012 10:49
console.js
var _e = function(){};
if( typeof console != 'undefined' ){
_e = function(){
var date = new Date()
,now = [ date.toLocaleTimeString(), '.', date.getMilliseconds(), ' -> ' ].join('');
if( arguments.length === 1 && typeof arguments[0] !== 'object' ){
console.log( '%c%d%o', 'font-style:italic;font-size:10px;', now, arguments[0] );
}else{
console.info( '%c%d%o', 'font-style:italic;font-size:10px;', now, arguments );
}
//e.g. http://domain:8888/?sleep=5000
var http = require("http");
var url = require("url");
var query = require("querystring");
http.createServer(function(request, response) {
var str = url.parse(request.url).query;
var obj = query.parse(str);
setTimeout(function(){
response.end();
@aben
aben / .gitconfig
Last active October 6, 2015 12:28
my git alias
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
dc = diff --cached
dl = diff --name-only
lg = log --color --graph --pretty=format:'%C(yellow)%h%Creset -%Cred%d%Creset %s %C(bold blue)(%cn %cr)%Creset'
ll = log --color --pretty=format:'%C(yellow)%h%Creset -%Cred%d%Creset %s %C(bold blue)(%cn %cr)%Creset' --no-merges --stat
@aben
aben / Solarized_Rock.yaml
Last active July 30, 2017 00:20
Solarized scheme for squirrel
solarized_rock:
name: "曬經石/Solarized Rock"
author: "Aben <[email protected]>, based on Ethan Schoonover's Solarized color scheme"
corner_radius: 7 #圓角
border_height: 0
border_width: 0
back_color: 0x362b00 #背景色
candidate_text_color: 0x969483 #候選字顏色
hilited_candidate_back_color: 0x8236d3 #高亮候選字背景色
hilited_candidate_text_color: 0xffffff #高亮候選字顏色
alias ls="ls -G"
alias ll="ls -alh"
#alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
# For MacVim.app, Open each file in a new tab
alias v="mvim --remote-tab-silent"
alias myhost="sudo v /etc/hosts"
alias bashrc="v ~/.bash_profile"
alias cleanhost="sudo dscacheutil -flushcache"
alias py="python"
alias rb="ruby"