Skip to content

Instantly share code, notes, and snippets.

View geopet's full-sized avatar
😍
Coding with my dog

Geoff Petrie geopet

😍
Coding with my dog
View GitHub Profile
@geopet
geopet / geopet.zsh-theme
Last active December 30, 2015 18:09
A ZSH prompt combining sporty_256 and Soliah
PROMPT='%{$fg[blue]%}%~%b%{$reset_color%} $(git_time_since_commit)$(check_git_prompt_info)
%% '
RPROMPT='%{$fg[blue]%}%n%{$reset_color%}@%{$fg[red]%}%M%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
# Text to display if the branch is dirty
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✘%{$reset_color%}"
@geopet
geopet / leader mappings
Created December 9, 2013 23:29
Fun file format leader mappings
map <leader>i mmgg=G`m<CR>
map <leader>i mxgg=G`x<CR>
@geopet
geopet / git_config.sh
Last active August 21, 2016 03:11
A set of scripts to be used to get a vagrant install up and running with Ruby 2.2.0, Rails 4.2.0, Git 2.0.1, Vim 7.4, MySQL, and PostgreSQL
#!/usr/bin/env bash
cd
git clone https://gist.github.com/8797857.git gitconfig
ln -s ~/gitconfig/.gitconfig ~/.gitconfig
@geopet
geopet / .zshrc
Last active September 19, 2019 21:30
barebones .zshrc with some .oh-my-zsh requirements
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="geopet"
DISABLE_AUTO_TITLE="true"
plugins=(
git
colored-man
tmux
)
@geopet
geopet / .gitconfig
Created February 4, 2014 03:47
barebones .gitconfig
[alias]
ff = merge --ff-only
[user]
email = [email protected]
name = Geoff Petrie
[color]
ui = true
[core]
editor = vim
[push]
@geopet
geopet / .irbrc
Created February 14, 2014 15:52
general .irbrc config
require 'rubygems'
require 'interactive_editor'
require 'awesome_print'
AwesomePrint.irb!
IRB.conf[:PROMPT_MODE] = :SIMPLE
IRB.conf[:EVAL_HISTORY] = 1000
IRB.conf[:SAVE_HISTORY] = 1000
@geopet
geopet / vim_config.sh
Created February 24, 2014 15:33
Vim config script: Allows for a complete reinstall of my dot vim files. This script *will* delete whatever was in your .vim, .vimrc and your .gvimrc. So please back those files up as needed before running this script!
#!/usr/bin/env bash
cd
rm -rf ~/.vim
rm -rf ~/.vimrc
rm -rf ~/.gvimrc
git clone [email protected]:geopet/dotvim.git ~/.vim
ln -s ~/.vim/vimrc ~/.vimrc
ln -s ~/.vim/gvimrc ~/.gvimrc
cd ~/.vim
@geopet
geopet / update_ruby.sh
Last active August 29, 2015 14:07
Update Source Ruby on a Vagrant Instance
#!/usr/bin/env bash
cd
sudo rm -rf /usr/local/bin/ruby
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.3.tar.gz
tar -xzvf ruby-2.1.3.tar.gz
cd ruby-2.1.3
./configure
make
sudo make install
@geopet
geopet / vim-init.sh
Created January 26, 2015 05:07
Vim Plugin Install and Update
#!/usr/bin/env bash
cd
# remove current vim directories
rm -rf ~/.vim
rm -rf ~/.vimrc
rm -rf ~/.gvimrc
@geopet
geopet / document-writer.js
Created March 27, 2018 21:44
Just a very basic node document writing script
console.log('Starting app.');
const fs = require('fs');
const os = require('os');
const user = os.userInfo();
fs.appendFile('greetings.txt', `Hello, ${user.username}.`, function(err) {
if (err) {
console.log('Unable to write to file');