Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
# INSTALLATION OPTIONS
TEST=yes
SRC=yes
UNPACK=yes
die () { echo "Wrong argument: $@"; exit; }
#!/bin/bash
die () { echo "$@"; exit; }
usage () {
cat <<USAGE
Description:
Setup the current hcss track and build to the environment
@TaurusOlson
TaurusOlson / RunProcessing.vim
Created February 24, 2013 14:36
A simple command for running Processing from Vim.
" Run procesing from the command line
function! RunProcessing()
let s:fullpath = expand("%:p:h")
let s:splitpath = split(s:fullpath, '/')
let s:processing_project = s:splitpath[-1]
echo "Launching " .s:processing_project
execute "!processing-java --sketch=" .s:fullpath. " --output=/tmp/" .s:processing_project. " --run --force &"
endfunction
@TaurusOlson
TaurusOlson / games.md
Last active December 15, 2015 23:20
Games I like to play
@TaurusOlson
TaurusOlson / dungeon_crawl_halfling_assassin.txt
Created April 11, 2013 19:28
Dungeon Crawl character: Halfling Assassin
Dungeon Crawl Stone Soup version 0.11.2 (console) character file.
Taurus the Sneak (Halfling Assassin) Turns: 3653, Time: 00:46:22
HP 38/39 AC 5 Str 10 XL: 6 Next: 1%
MP 5/5 EV 14 Int 11 God: Trog [*.....]
Gold 53 SH 0 Dex 18 Spells: 0 memorised, 5 levels left
Res.Fire : . . . See Invis. : . a - +2 dagger {=f}
Res.Cold : . . . Warding : . w - +0 leather armour
@TaurusOlson
TaurusOlson / statusline.vim
Last active April 2, 2020 10:42
My Vim statusline. Specificities: - Simple - Show the current function and the current Git branch (using taglist and fugitive)
set statusline =
" Buffer number
set statusline +=[%n]
" File description
set statusline +=%f\ %h%m%r%w
" Filetype
set statusline +=%y
" Name of the current function (needs taglist.vim)
set statusline +=\ [Fun(%{Tlist_Get_Tagname_By_Line()})]
" Name of the current branch (needs fugitive.vim)
@TaurusOlson
TaurusOlson / scratch_config.vim
Created June 8, 2013 16:23
Mappings for toggling the scratch buffer.
nnoremap <C-S> :Sscratch<CR>
augroup scratch
autocmd!
autocmd BufEnter __Scratch__ nnoremap <C-S> :q<CR>
autocmd BufLeave __Scratch__ nnoremap <C-S> :Sscratch<CR>
augroup END
@TaurusOlson
TaurusOlson / mapping_for_blocks.vim
Last active December 18, 2015 05:49
Selection of blocks (handy for Lisp/Clojure or html)
nnoremap q) va) " expand
vnoremap q) a) " expand in visual mode (keep expanding)
vnoremap q( <ESC>%f(va) " collapse
nnoremap q] va]
vnoremap q] a]
vnoremap q[ <ESC>%f[va]
nnoremap q} va}
vnoremap q} a}
@TaurusOlson
TaurusOlson / elementwise.py
Created June 16, 2013 19:48
Converting a function to an elementwise function
def elementwise(fn):
def newfn(arg):
if hasattr(arg,'__getitem__'): # is a Sequence
return type(arg)(map(fn, arg))
else:
return fn(arg)
return newfn
@elementwise
@TaurusOlson
TaurusOlson / ptml.py
Created August 7, 2013 10:22 — forked from kstep/ptml.py
#
# Python Template Markup Language
# Simple Python DSL for HTML and (a little) CSS templating.
#
# Example:
#
# from ptml import *
#
# with html5 as out:
# with head: