Skip to content

Instantly share code, notes, and snippets.

View grafikchaos's full-sized avatar

Josh J. grafikchaos

View GitHub Profile
@grafikchaos
grafikchaos / aliases.zsh
Created February 7, 2013 23:06
oh-my-zsh aliases plugin for common aliases I use
# ~/.oh-my-zsh/custom/aliases.zsh
# At the end of the file you can add the aliases from above
# or any other ones you find useful
alias ..='cd ..'
alias ll='ls -alGhF'
alias install='sudo apt-get install'
alias upgrade='sudo apt-get upgrade'
alias update='sudo apt-get update'
alias search='sudo apt-cache search -n'
@grafikchaos
grafikchaos / InstallingGitUsingYum.md
Created October 17, 2012 21:07 — forked from eddarmitage/InstallingGitUsingYum.md
Installing git on CentOS 5 using yum

Installing git on CentOS 5 using yum

Since you're using CentOS 5, the default package manager is yum, not apt-get. To install a program using it, you'd normally use the following command:

$ sudo yum install <packagename>

However, when trying to install git this way, you'll encounter the following error on CentOS 5:

@grafikchaos
grafikchaos / gist:3185895
Created July 27, 2012 02:36 — forked from olistik/gist:2627011
Ubuntu 12.04 setup (rbenv, janus, postgres)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git
  • Copy/paste from the command line:
sudo apt-get install xclip
@grafikchaos
grafikchaos / git-destroy-branch alias
Created July 12, 2012 01:44
git destroy the remote and local version of the branch
# in your aliases
# (make sure your git-destroy-branch.sh is executable -> chmod +x path/to/your/git-destroy-branch.sh)
alias git-delete-branch='path/to/your/git-destroy-branch.sh'
@grafikchaos
grafikchaos / git-create-branch alias
Created July 12, 2012 01:40
git create and track remote branch
# in your aliases
# make sure your git-create-branch.sh is executable -> chmod +x path/to/your/git-create-branch.sh
alias gcb='path/to/your/git-create-branch.sh'
@grafikchaos
grafikchaos / SVN wipeout
Created July 10, 2012 22:56
SVN wipe out the repo
see http://stackoverflow.com/a/1462886
svn checkout --depth immediates http://myrepo.com/svn/myrepo myworking_copy
cd myworking_copy
svn rm *
svn ci -m "Deleting all"
@grafikchaos
grafikchaos / Rails 3 asset pipeline production
Created June 8, 2012 02:12
precompile all CSS/JS assets
# == Precompile assets
#
# precompiles all CSS/JS assets in the app/assets b/c I'm lazy
# and I don't want to freaking update this every time we add/use
# sass or coffeescript files
#
# This strategy excludes the other default asset directories
# (lib/assets, vendor/assets) as well as any assets located
# in gems (which is okay b/c they can be called with an @import
# command or a manifest file)
@grafikchaos
grafikchaos / gist:2720827
Created May 17, 2012 18:41 — forked from petemcw/gist:2719758
Commands to clean a Ubuntu install for smaller Vagrant packages
# Remove items used for building, since they aren't needed anymore
sudo apt-get clean
sudo apt-get -y remove linux-headers-$(uname -r) build-essential
sudo apt-get -y autoremove
# Zero out the free space to save space in the final image:
suod dd if=/dev/zero of=/EMPTY bs=1M
sudo rm -f /EMPTY
# Removing leftover leases and persistent rules
@grafikchaos
grafikchaos / gist:1622609
Created January 16, 2012 19:50
Cucumber + Spork env.rb
require 'rubygems'
require 'spork'
Spork.prefork do
require 'simplecov'
# SimpleCov.start 'rails'
require 'cucumber/rails'
require 'factory_girl/step_definitions'
require 'email_spec'
@grafikchaos
grafikchaos / tell vim to STFU about not having permission to save a file
Created August 23, 2011 16:50
Save files in vim even if you forgot to edit as root
:w !sudo tee %