Skip to content

Instantly share code, notes, and snippets.

View jacob-ogre's full-sized avatar

Jacob Malcom jacob-ogre

View GitHub Profile
alias ll='ls -la'
alias ld='ll | grep '^d''
alias tmkill='tmux kill-session'
alias tmux='TERM=xterm-256color tmux'
alias lonestar='ssh username@lonestar.tacc.utexas.edu'
alias stampede='ssh username@stampede.tacc.utexas.edu'
export TERM=xterm-256color
export GOROOT=$HOME/go
<snippet>
<content><![CDATA[
from ${1:module} import ${2:sub} as ${3}
]]></content>
<tabTrigger>from</tabTrigger>
<scope>source.python</scope>
<description>from_import_as</description>
</snippet>
@jacob-ogre
jacob-ogre / iflen.snippet
Last active December 17, 2015 14:59
Python: if len(sys.argv) != N A vim-snippet for exiting if the number of command-line arguments is incorrect.
snippet iflen
if len(sys.argv) != ${1:N}:
print main.__doc__
sys.exit()
${2}
@jacob-ogre
jacob-ogre / r_commentblock.snippet
Last active December 17, 2015 14:59
R: comment_block A vim-snippets for a 79-col comment block, which I use to delineate sections of scripts.
snippet combl
###########################################################################
# ${1:Comment text}
###########################################################################
${2}
@jacob-ogre
jacob-ogre / r_readtable.snippet
Last active December 17, 2015 14:49
Vim snippet for R's read.table function.
snippet read
${1:name} <- read.table("${2:path/to/file}",
sep="${3:\t ,}",
header=${4:T F})
@jacob-ogre
jacob-ogre / .vimrc
Created May 20, 2013 13:40
My .vimrc, which captures most of the functionality of Sublime Text 2 while using all open-source software. One particularly important difference (for me) is that the use of tmux and vim-slime permits running a script in one pane and an REPL in a second pane, and sending lines/blocks of, e.g., R code from pane 0 to pane 1 (or whatever arrangemen…
color desert
filetype plugin on
syntax on
let mapleader = ","
let g:mapleader = ","
let g:slime_target = "tmux"
let python_highlight_all = 1
map <F12> :let &background = ( &background == "dark"? "light" : "dark" )<CR>
@jacob-ogre
jacob-ogre / JWM_file_header
Last active December 17, 2015 12:19
A header
# CC0, a GPL-compliant copyright; this code is released to the public domain.
# See <http://creativecommons.org/publicdomain/zero/1.0/>
#
# Written in MONTH YEAR by AUTHOR(S), email
#
@jacob-ogre
jacob-ogre / macfanctl.conf
Created May 18, 2013 16:00
A config file to keep a Macbook Pro 5,5 cool while running Linux mint
# Config file for macfanctl daemon
#
# Note: 0 < temp_X_floor < temp_X_ceiling
# 0 < fan_min < 6200
fan1_min: 2000
temp_avg_floor: 35
temp_avg_ceiling: 45
@jacob-ogre
jacob-ogre / Function_Doc.sublime-snippet
Created April 6, 2013 12:20
R: Function Documentation
<snippet>
<content><![CDATA[
# ${1:summary}
#
# USAGE:
# ${2:fx_call}(${3:vars})
#
# ARGS:
# ${4:args}
#
<snippet>
<content><![CDATA[
${1:variable} <- cor(${2:var/mat}, ${3:var,} use=${4:"complete.obs"})]]></content>
<tabTrigger>cor</tabTrigger>
<scope> source.r, source.rd.console</scope>
<description>correlation</description>
</snippet>