Skip to content

Instantly share code, notes, and snippets.

View Coomer's full-sized avatar

Christian Coomer Coomer

View GitHub Profile
@Coomer
Coomer / install.sh
Created May 1, 2012 16:24
Install dependencies for chef & run chef-solo
#!/bin/bash
# This script runs as root on the server
chef_binary=/usr/local/bin/chef-solo
# Are we on a vanilla system? If so, install Ruby and the chef gem
if ! test -f "$chef_binary"; then
export DEBIAN_FRONTEND=noninteractive
# Upgrade headlessly (this is only safe-ish on vanilla systems)
@Coomer
Coomer / .screenrc
Created February 28, 2014 19:26
Coomer's .screenrc for GNU Screen on Mac OS X. Save this as .screenrc in your home directory.
altscreen on
hardstatus on
hardstatus alwayslastline
startup_message off
termcapinfo xterm ti@:te@
hardstatus string " %{= kC}%-w%{.rW}%n %t%{-}%+w %=%{..C} %H %{..C} %m/%d "
defscrollback 1000
# Bind C-a v to copy buffer to Mac OS X clipboard.
bind v eval "writebuf" "exec sh -c 'pbcopy < /tmp/screen-exchange'"
@Coomer
Coomer / .bashrc_fun_colors
Created December 10, 2017 16:06
.bashrc_fun_colors
# Enable colored output for ls
export CLICOLOR=true
# First a basic colored prompt
export PS1='\[\033[0;32m\]\u@\h\[\033[0;36m\] \w\[\033[00m\]: '
# Then fancy colored prompts
function EXT_COLOR () { echo -ne "\[\033[38;5;$1m\]"; }
if [ "$TERM" = "xterm-256color" ]; then
# Normal windows get a green-yellow fade prompt
colors="`EXT_COLOR 118`ro"