Skip to content

Instantly share code, notes, and snippets.

@coffeant
coffeant / .vimrc
Last active August 29, 2015 14:11 — forked from MauricioCarneiro/.vimrc
" Vundle configuration
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/vundle/ " set the runtime path to include Vundle and initialize
call vundle#begin()
" Plugins
Bundle 'gmarik/vundle'
Bundle 'Valloric/YouCompleteMe'
Bundle 'a.vim'
@coffeant
coffeant / gist:adcce46d6f19d915fea2
Last active August 29, 2015 14:10 — forked from chappyhome/gist:7615718
利用rsync自动同步服务器与本地代码的python脚本
菜鸟表示写web时 每次修改完后把文件往VPS上丢很麻烦
用ssh sshfs scp都太慢 小东西又懒得用git
sublimetext上得sftp不支持中文 emacs干脆就只能ssh
于是用linux自带的rsync写了个同步脚本
可以手动或自动往服务器上差异性同步 不用scp一堆东西 也不用忍受ssh那个渣速度
把脚本copy到你的目录 修改脚本内的配置 如果在脚本内设置了密码 那每次上次就会自动输入密码 否则除非你设置本地key 否则都要输密码
如果代码在服务器上 先执行 : python rsync.py -down 把代码download下来 , 个人觉得先down下来再修改 不用忍受每次load一遍 比较舒服
@coffeant
coffeant / ba-smallwalker.js
Created May 11, 2011 01:55 — forked from cowboy/ba-smallwalker.js
Small Walker: A small and simple JavaScript DOM walker
/*!
* Small Walker - v0.1.1 - 5/5/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
// Walk the DOM, depth-first (HTML order). Inside the callback, `this` is the