Skip to content

Instantly share code, notes, and snippets.

View amcooper's full-sized avatar
🐖
🐖

Adam Cooper amcooper

🐖
🐖
View GitHub Profile
# 256 colors for vim
set -g default-terminal "screen-256color"
# Start window numbering at 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# Cycle panes with C-b C-b
unbind ^B
bind ^B select-pane -t :.+
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
# just add to the .profile or .bash_rc
# don't set prompt if this is not interactive shell
[[ $- != *i* ]] && return
color_default='\['`tput sgr0`'\]'
color_red='\['`tput sgr0; tput setaf 1`'\]'
color_green='\['`tput sgr0; tput setaf 2`'\]'
color_yellow='\['`tput sgr0; tput setaf 3`'\]'
color_light_blue='\['`tput sgr0; tput setaf 4`'\]'
@amcooper
amcooper / .welcome_prompt.sh
Last active October 26, 2016 03:22
This welcome prompt prints stats on terminal load
#-------------------------------------------------------------------------------
# Welcome Prompt
# prints stats on terminal load
#-------------------------------------------------------------------------------
# welcome and unwelcome functions to toggle welcome_prompt are in .bash_prompt
WELCOME_PROMPT=true
welcome_msg() {
echo $(git --version)
# My own scripts
export PATH="~/bin:$PATH"
### RBENV
export PATH="$HOME/.rbenv/bin:$PATH"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
alias l='ls -alh'
export GIT_MERGE_AUTOEDIT=no
@amcooper
amcooper / player_script.rb
Last active July 1, 2016 01:26
Basic Ruby code for launching a command-line MP3 player and playing a file
# Basic Ruby code for launching a command-line MP3 player and playing a file
command = "afplay fatal_wedding.mp3"
value = `#{command}`