Skip to content

Instantly share code, notes, and snippets.

@bmnn
bmnn / .zshrc
Last active December 29, 2015 18:49
zsh; tmux; alias; environment variables;
# Start tmux
if [ "$TMUX" = "" ]; then tmux; fi
# Set theme
ZSH_THEME="gallifrey"
# Customize envionment variables
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl:/usr/local/texlive/2013/bin/i386-linux
export VISUAL='emacsclient --no-wait --alternate-editor vim'
@bmnn
bmnn / gist:7712967
Last active December 29, 2015 18:49
gist; terminal; upload; utility
%r% (url='http://defunkt.io/gist/')
@bmnn
bmnn / gist:7712986
Created November 29, 2013 22:42
gist; emacs; utiltiy;
;r;(url'https://github.com/defunkt/gist.el')
@bmnn
bmnn / gist:7713003
Last active December 29, 2015 18:49
git; commit; list; changed files;
#r#(url='http://stackoverflow.com/questions/424071/list-all-the-files-for-a-commit-in-git')
git diff-tree --no-commit-id --name-only -r <commit-ish>
@bmnn
bmnn / gist:7713019
Last active December 29, 2015 18:49
align; negative; floating point; numbers; decimal; printf;
//r// (url='http://www.cplusplus.com/reference/cstdio/printf/')
// \ldots A format specifier follows this prototype: \ldots
// \ldots %[flags][width][.precision][length]specifier \ldots
// \ldots If no sign is going to be written, a blank space is inserted before the value \ldots
// \ldots Minimum number of characters to be printed. \ldots The value is not [respected] \ldots if the result is larger [and would be truncated]. \ldots
int printf ( const char * format, ... );
@bmnn
bmnn / gist:7713034
Last active December 29, 2015 18:49
matrix; inversion; stable; matlab;
inv = @(A) A \ eye(size(A))
@bmnn
bmnn / startup.m
Last active December 29, 2015 18:49
matlab; initialization;
% dock all windows by default
set(0,'DefaultFigureWindowStyle','docked')
% change to shared folder
cd('C:\sF')
@bmnn
bmnn / gist:7713066
Created November 29, 2013 22:52
python; import; module; path;
#r# (url='http://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path')
# \ldots The advantage of adding a path to sys.path (over using imp) is that it simplifies things when importing more than one module from a single package. For example: \ldots
import sys
# the mock-0.3.1 dir contains testcase.py, testutils.py & mock.py
sys.path.append('/foo/bar/mock-0.3.1')
@bmnn
bmnn / .gitconfig
Last active December 29, 2015 19:49
git; alias; colors; config;
# user {{{
[user]
email = bmnn.mchl@gmail.com
name = mchl@envy
# }}}
# color {{{
[color]
@bmnn
bmnn / gist:7719718
Created November 30, 2013 14:25
git; alias; case sensitive; characters;
%r%(url='http://stackoverflow.com/questions/16821151/what-characters-can-i-use-in-a-git-alias')
The variable names are case-insensitive, allow only alphanumeric characters and -, and must start with an alphabetic characte.