This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Manage a simple HTTP server | |
# | |
# Usage: | |
# http start|stop|restart [port] | |
# | |
# Notes: | |
# Add to .bashrc and resource (source ~/.bashrc) | |
http () { | |
local port="${2:-8000}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert restructuredText file to HTML | |
# | |
# Usage: | |
# rst2html file.rst | |
# | |
# Notes: | |
# Add to .bashrc | |
# Set stylesheet path and/or default stylesheet | |
# Source .bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Three little shell functions of use when managing | |
# subversion repos. | |
# | |
# nosvn - remove a directory from revision control | |
# svnrev - print repo rev number | |
# startsvn - start the subversion daemon | |
# Remove directory from revision control | |
nosvn () { | |
DIR=${1:-"."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
xls2tsv - print the sheetnames or contents of a worksheet from an excel workbook. | |
Usage: xls2tsv [options] | |
Options: | |
-h, --help show this help message and exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
md2html - convert a markdown file to html | |
Dependencies: markdown module (pip install Markdown) | |
Usage: | |
md2html file.md > file.html | |
md2html file.md | browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="style.css"> | |
<body> | |
<h1>READ.ME</h1> | |
<p>Why can't we just fence our code?</p> | |
<pre><code>print = console.log</code></pre> | |
<p>Another chunk of code:</p> | |
<pre><code>print 'hello world!'</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Supplements for ~/.vim/ftplugin/coffee.vim. | |
" Use Mick Koch's [plugin](http://github.com/kchmck/vim-coffee-script) as base. | |
setlocal tabstop=2 | |
setlocal softtabstop=2 | |
setlocal shiftwidth=2 | |
ab bang! #!/usr/bin/env coffee | |
" ,r run/execute code in file (faster to type than ,x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Language: Python | |
setlocal tabstop=4 | |
setlocal softtabstop=4 | |
setlocal shiftwidth=4 | |
ab bang! #!/usr/bin/env python | |
" run tests in current file | |
nmap <LocalLeader>t :!nosetests %<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://github.com/jashkenas/coffee-script/raw/master/extras/coffee-script.js"></script> | |
<style>/* CSS */</style> | |
<body> | |
<div id="viz"></div> | |
<script type="text/coffeescript"> | |
alert("hello world") | |
# CODE # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Add this to ~/.vim/ftdetect/md-litcoffee.vim | |
" Language: Literate CoffeeScript | |
autocmd BufNewFile,BufRead *.litcoffee set filetype=litcoffee | |
autocmd BufNewFile,BufRead *.coffee.md set filetype=litcoffee |
OlderNewer