Skip to content

Instantly share code, notes, and snippets.

View ericvanjohnson's full-sized avatar
🐘
Probably doing PHP Stuff.

Eric Van Johnson ericvanjohnson

🐘
Probably doing PHP Stuff.
View GitHub Profile
@ericvanjohnson
ericvanjohnson / gist:4597876
Last active December 11, 2015 11:59
Rsync over SSH (local to remote)
rsync -ave "ssh" /local/file/path/ USER@REMOTE_SERVER:/remote/file/path/
@ericvanjohnson
ericvanjohnson / gist:4597880
Created January 22, 2013 19:55
Rsync over SSH using SUDO on the remote server
rsync -ave "ssh" --rsync-path="sudo rsync" USER@REMOTE_SERVER:/remote/file/path/ /local/file/path
@ericvanjohnson
ericvanjohnson / gist:4597890
Created January 22, 2013 19:56
Figure out what the size of files and folders in a particular directory.
ls -1A | tr '\n' '\0' | xargs -0 du -sk | sort -
@ericvanjohnson
ericvanjohnson / .vimrc
Created March 8, 2013 20:48
My Current VIMRC Configuration
set nocompatible " be iMproved
filetype off " required!
" Setting my ColorScheme
color murphy
" colors getafe
" Environment {
" Basics {
set nocompatible " must be first line
@ericvanjohnson
ericvanjohnson / .gvimrc
Created March 8, 2013 20:52
My Current GVIMRC for MacVim
color codeschool
set guifont=Monaco:h12
" let g:NERDTreeWinPos = "right"
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
:set cpoptions+=$ " puts a $ marker for the end of words/lines in cw/c$ commands"
#!/bin/bash
# Set these variables
USER_NAME="you@example.com"
API_KEY="XXXXXXXX_YOUR_DHQ_API_KEY_XXXXXXXXXXXXX"
START_REV='SOME_ARBITRARY_GIT_REVISION_HASH_TO_START_FROM'
DHQ_API_PROJ="your-project-shortname"
DHQ_BASE_URL="https://yoursite.deployhq.com/"
DHQ_SERVER_GROUP="YOUR_SERVER_GROUP_UUID"
DHQ_SERVER_USERNAME="your-server-username"
#set prefix to be Ctrl+A
set -g prefix C-a
unbind C-b
set -sg escape-time 1
#splitting
bind | split-window -h
bind _ split-window -v
@ericvanjohnson
ericvanjohnson / gist:5688479
Last active December 17, 2015 23:19
BASH Function to make a copy of file before using VI to edit it
evim () { cp "$@" ~/BackUps/$(date +"%Y%m%d%H%M")-$(basename "$@") ; vi "$@" ; }
@ericvanjohnson
ericvanjohnson / vagrant.org
Created June 30, 2013 12:17 — forked from zellyn/vagrant.org
Vagrant Ruby Spin Up
@ericvanjohnson
ericvanjohnson / tmux.conf
Created August 7, 2013 18:35
my tmux configuration
#set prefix to be Ctrl+A
set -g prefix C-a
unbind C-b
set -sg escape-time 1
#splitting
bind | split-window -h
bind _ split-window -v