Skip to content

Instantly share code, notes, and snippets.

@huydx
huydx / vim prepend regex
Created November 28, 2012 17:22
prepend to top of each file with Regex VIM
:args **/*.ruby
:set hidden
:argdo norm! O# encoding: UTF-8
:wqa
@huydx
huydx / pgessays.py
Created November 18, 2012 15:57 — forked from olasitarska/pgessays.py
Builds epub book out of Paul Graham's essays.
# -*- coding: utf-8 -*-
"""
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html
Author: Ola Sitarska <[email protected]>
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/
"""
import re, ez_epub, urllib2, genshi
@huydx
huydx / gist:4007812
Created November 3, 2012 16:24
to remap ctrl-c ctrl-s in vim
##.bashrc
vim()
{
local STTYOPTS="$(stty --save)"
stty stop '' -ixoff
command vim "$@"
stty "$STTYOPTS"
}
##.vimrc
@huydx
huydx / alias remove
Created November 3, 2012 16:21
remove will ask whenever executed rm
% alias del rm -i
@huydx
huydx / vim-setup
Last active October 12, 2015 09:38
personal vim setup
"------personalize
:set visualbell
:syntax on
:set number
filetype plugin on
set ofu=syntaxcomplete#Complete
:set gfn=Monaco:h14
:colorscheme desert
set mouse=a
set mouse=a