Skip to content

Instantly share code, notes, and snippets.

@Reder
Reder / gist:2403113
Created April 17, 2012 03:08
Preferences.sublime-settings
{
"auto_match_enabled": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"font_face": "Monaco",
"font_size": 16.0,
"highlight_line": true,
"open_files_in_new_window": true
}
@Reder
Reder / .vimrc
Last active June 8, 2017 18:47
.vimrc
" Reder's vimrc
" Reder Tseng <[email protected]>
" Ref:
" 1. <https://github.com/vgod/vimrc>
" 2. <https://github.com/gmarik/vimfiles>
"
" Usage:
" 1. Download .vimrc
" 2. Setup vundle:
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
@Reder
Reder / gist:1238974
Created September 24, 2011 04:40
GroovyScript for checking link between Notational Velocity Data
def nvDir = '/Users/mac/Documents/Notational Data'
def files = new File(nvDir).list() as List
def result = new ArrayList(files)
new File(nvDir).eachFile {
def text = it.text
files.each {
def name = it.replaceAll('\\.txt$|\\.markdown$', '')
if (text.contains("[[${name}]]")){
result.remove(it)
@Reder
Reder / gist:553902
Created August 27, 2010 18:24 — forked from anonymous/gist:553899
Modified from [Make.text](http://homepage.mac.com/tjim/).
javascript:(function(){/**%20Make.text%201.5.%20Trevor%20Jim.%20License:%20GPL%20v2%20(www.fsf.org/copyleft/gpl.html).%20**/%20var%20logging%20=%20false;%20var%20logString%20=%20'';%20var%20unhandled%20=%20{};%20%20function%20log(exn,msg)%20{%20if%20(!logging)%20return;%20logString%20+=%20msg%20+%20':%20'%20+%20exn%20+%20'%5cn';%20}%20var%20w%20=%20window.open('');%20%20var%20d%20=%20w.document;%20var%20last%20=%20null;%20function%20addText(s)%20{%20if%20(last%20!=%20null)%20d.write(last);%20last%20=%20s;%20}%20function%20llapLast(s)%20{%20if%20(last)%20last%20=%20last.replace(/%20%20%20%20$/,s);%20}%20function%20finishOutput()%20{%20addText(%22%22);%20}%20var%20links%20=%20new%20Array(window.location);%20%20var%20rlinks%20=%20{};%20rlinks[window.location]%20=%200;%20var%20linkTitles%20=%20new%20Array();%20var%20atP%20=%20true;%20var%20atLeft%20=%20true;%20var%20atNoWS%20=%20true;%20%20var%20left%20=%20'%5cn';%20function%20pushLeft(s)%20{%20var%20oldLeft%20=%20left;%20left%20+=%20s;%20if%20(atP)%20addText(s);
@Reder
Reder / gist:145556
Last active September 5, 2016 22:51
Javascript to gt client width and height.
function getClient(e)
{
var h, w, de;
if (e) {
w = e.clientWidth;
h = e.clientHeight;
} else {
de = document.documentElement;
w = window.innerWidth || self.innerWidth
|| (de&&de.clientWidth) || document.body.clientWidth;