Skip to content

Instantly share code, notes, and snippets.

@sometimesfood
sometimesfood / chef-standalone-bootstrap.sh
Last active September 26, 2015 15:17
Chef standalone bootstrap with chef-admin-essentials
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -qy curl git-core lsb-release chef
mkdir ~/cookbooks
cd ~/cookbooks
echo '*~' > .gitignore
git init
git add .
git commit -am 'Initial commit'
@sometimesfood
sometimesfood / grml-console.sh
Created May 12, 2011 11:37
Set up grml console config
#!/bin/bash
mkdir -p ~/.dotfiles
git clone git://git.grml.org/grml-etc-core.git ~/.dotfiles/grml-etc-core
cd ~/.dotfiles/grml-etc-core
export LAST_RELEASE=$(git describe)
git checkout $LAST_RELEASE
ln -sf ~/.dotfiles/grml-etc-core/etc/grml/screenrc_generic ~/.screenrc
ln -sf ~/.dotfiles/grml-etc-core/etc/vim/vimrc ~/.vimrc
ln -sf ~/.dotfiles/grml-etc-core/etc/zsh/zshrc ~/.zshrc
touch ~/.zshrc.local
@sometimesfood
sometimesfood / osx-dot-emacs
Created February 24, 2011 12:05
OS X minimal .emacs
(defun macosx-p()
(string= "darwin" system-type))
(when (macosx-p)
(setq mac-option-key-is-meta nil)
(setq mac-command-key-is-meta t)
(setq mac-command-modifier 'meta)
(setq mac-option-modifier nil)
(set-default-font "Menlo-Regular-14")
(blink-cursor-mode 1)
@sometimesfood
sometimesfood / .irbrc
Created January 22, 2011 19:56
my ~/.irbrc
require 'irb/completion'
require 'irb/ext/save-history'
require 'pp'
# Load the readline module.
IRB.conf[:USE_READLINE] = true
# Remove the annoying irb(main):001:0 and replace with >>
IRB.conf[:PROMPT_MODE] = :SIMPLE
@sometimesfood
sometimesfood / handy-aliases.sh
Last active June 1, 2017 14:42
handy shell aliases
playrar () { unrar p -inul $* | mplayer -noidx -cache 30000 - }
alias spindown="sdparm --flexible --command=stop"
alias diff2html="pygmentize -f html -O full,style=emacs -l diff"
alias wdiff2html="pygmentize -f html -O full,style=emacs -l wdiff"