Skip to content

Instantly share code, notes, and snippets.

a9f0fdc201c6f11b3a35fce3710c1859f581e89c5ff5daddd21180c93fab6b10
924e498b9128b377a83981dc0df03ac514e98d88e0fd7fca70db8a6972c4f4be
4421758a7a129c6ce711215cb3247fd086a6d360638a9f16b6c3518abbffb1ae
b5456185a3f83dc17627ee5d55b1749c392930e63463ae8ae36020637f47aa9c
0e242a44ddcb4c4cc14d8ed3545a9abd2814701e1865a5b00de6e00cf6e2653e
2dce282e78dbe22d0e231da6e4a090a06632099393f76a77a665c047f3b4a7f1
0d5d1d397a19784ccc797e9d8259f2bdb1f94183d14072b0ee79215eea9f5f7a
9bcac902b99a743fb1fa5c7b5cb11c59645af8bb4b6b8cb6f94fcd54c1d937b4
f2194e18f8b12ec4a0dc2500880324138e0d4a3731ee3995bddbaf0d2987243e
3776e25a5b96263292a6c1bac3739a88ab2609bfc831a43159f407e6ee7fe6a5
@kelmandor
kelmandor / blender shortcuts
Created February 18, 2014 12:15
jotted down after doing the tutorials at: http://gryllus.net/Blender/3D.html
blender shortcuts:
ctrl-alt-q : toggle quad view
ctrl-up : fullscreen focused view
(ctrl)-(1|3|7) : jumps to top/side/front view (ctrl shows opposite)
5 : perspective/orthographic view toggle
0 : camera view
. (numpad period) : view selected object
/ : see all objects
2/8 : spin scene up/down
@kelmandor
kelmandor / nsis long strings install
Created February 18, 2014 12:13
this is how i install nsis long strings build on ubuntu
cd
mkdir nsis_new
cd nsis_new
wget http://files.hannobraun.de/nsis/nsis-common_2.46-7_all.deb
wget http://files.hannobraun.de/nsis/nsis_2.46-7_amd64.deb
sudo apt-get remove nsis
sudo apt-get remove nsis-common
sudo dpkg -i nsis-common_2.46-7_all.deb
sudo dpkg -i nsis_2.46-7_amd64.deb
@kelmandor
kelmandor / git stuff
Created February 18, 2014 12:10
important git stuff
switch to a new remote branch: git checkout --track remotes/origin/fixes
git push --set-upstream origin staging
search for a word in all branches:
git log --branches -S "doriscool"
find which branches contains a commit:
git branch --contains <commit>
@kelmandor
kelmandor / non-exception hash-array assignment
Created September 12, 2013 12:39
instantiate array/hash if it doesnt exist to instert a value. this is to avoid exceptions (done in a sexy way)
irb(main):001:0> a = {}
=> {}
irb(main):002:0> a[:b][:c] = 3
NoMethodError: undefined method `[]=' for nil:NilClass
from (irb):2
from /Users/dkelman/.rbenv/versions/1.9.3-p327/bin/irb:12:in `<main>'
=========================================
a = {}
(a[:b] ||= {})[:c] = 3
@kelmandor
kelmandor / dk git configs
Created August 25, 2013 12:35
these are the git configs i have in place as my optimized settings.
git config --global user.name "<your full name>"
git config --global user.email <you>@domain.com
git config --global color.ui auto
git config --global core.editor vim
git config --global core.excludesfile $HOME/.git.excludesfile
git config --global push.default tracking
git config --global merge.conflictstyle diff3
@kelmandor
kelmandor / new vm setup
Created July 17, 2013 08:58
these are the steps i take to create a new vm with all the services i know and love.
new VM!!
first of all to set the command prompt, add this to ~/.profile and change the text needed to change:
PS1="\u@\e[0;31mTHISTEXTCHANGE\e[m \w $ \e[m"
next, install avahi: sudo apt-get install avahi-daemon
now you can log in by the hostname dot local!!
sudo apt-get install build-essential
git dependencies: sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
@kelmandor
kelmandor / ubuntu rbenv setup
Created July 17, 2013 08:56
these are the steps i take for setting up rbenv on a new ubuntu vm. notice that with oh-my-zsh installed the bash_profile changes to zshrc.
sudo apt-get install libssl-dev zlib1g-dev
sudo apt-get install libreadline-dev
==========================================================================================
to switch from rvm to rbenv:
first call 'rvm implode'
@kelmandor
kelmandor / find big files
Last active December 19, 2015 19:39
finding big files on ubuntu
sudo find / -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
@kelmandor
kelmandor / dk oh-my-zsh theme
Last active December 19, 2015 17:19
this is my custom oh-my-zsh theme that we use at crossrider so that the command line will have THE TIME when we issued commands.
# file name: dk.zsh-theme
# in file ~/.zshrc change/add this line: ZSH_THEME="dk"
# Adding time stamp to the russel theme.
PROMPT='%{$fg_bold[yellow]%}%T% %{$fg_bold[red]%} DorIsCool ➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"