Skip to content

Instantly share code, notes, and snippets.

View kelsin's full-sized avatar

Christopher Giroir kelsin

View GitHub Profile
@kelsin
kelsin / remote-vim.sh
Last active August 29, 2015 13:56
Vim remote editing alias
alias e='gvim --remote-silent'
@kelsin
kelsin / path.sh
Created February 18, 2014 07:13
Adding folders to PATH
# Path adding function
pathadd() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
PATH="$1:$PATH"
fi
}
export PATH
pathadd "/c/Program Files (x86)/Vim/vim74"
pathadd "$HOME/opt/ctags58"
@kelsin
kelsin / windows.vim
Created February 18, 2014 07:20
Letting windows vim use .vim instead of _vim
" Adding runtimepath for windows so we can use .vim instead of _vim
if !exists("g:loaded_runtime")
set runtimepath=~/.vim,$VIMRUNTIME
let g:loaded_runtime = 1
endif
@kelsin
kelsin / setup-windows
Created February 18, 2014 19:53
First draft at script to help setup my windows environment
#!/bin/bash
function echoGreen {
echo -ne "\033[0;32m*\033[0m "
echo $@
}
function echoRed {
echo -ne "\033[0;31m*\033[0m "
echo $@
@kelsin
kelsin / .gitconfig_bad
Last active August 29, 2015 13:56
Windows Git created a bad path to global git ignore file
# Bad!
[core]
excludesfile = c:/home/kelsin/.gitignore_global
@kelsin
kelsin / boot.java
Last active August 29, 2015 13:56
Getting full java classpath in a maven project
/**
* This will return all of the classpath elements from
* the JRE boot classpath
*/
public List<String> getBootClasspathElements() {
return Arrays.asList(System.getProperty("sun.boot.class.path").split(";"));
}
@kelsin
kelsin / autoload-example.vim
Last active August 29, 2015 13:56
A example of autoloading
" This file should be /autoload/example.vim
" Here is the function that our command runs
function! example#run()
echo g:example_option
endfunction
@kelsin
kelsin / .vimrc
Created February 25, 2014 05:33
Moving to Vundle
" Runtime Path and Vundle {{{
" Use Vim defaults instead of trying for Vi compatibility
set nocompatible
" Adding runtimepath for windows so we can use .vim instead of _vim
if !exists("g:loaded_runtime")
set runtimepath=~/.vim,$VIMRUNTIME,~/.vim/bundle/vundle,~/.vim/after
let g:loaded_runtime = 1
endif
@kelsin
kelsin / vundle.sh
Created February 25, 2014 05:37
Installing Vundle
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
@kelsin
kelsin / cask.sh
Last active August 29, 2015 13:57
Installing my emacs cask setup on a new machine
# Update my config
git pull
# Install Cask
curl -fsSkL https://raw.github.com/cask/cask/master/go | python
# Make sure cask is in your path
#
# Since it was in my updated config files,
# I just needed to open a new terminal and then: