This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# curl https://gist.github.com/mattes/5869665/raw | sh | |
echo "hello world" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"create_window_at_startup": false, | |
"font_size": 12, | |
"open_files_in_new_window": true, | |
"rulers": | |
[ | |
80 | |
], | |
"show_full_path": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://gist.github.com/mattes/00112233/raw | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function installed? { command -v $1 >/dev/null 2>&1; } | |
function dir? { [[ -d $1 ]]; } | |
function brew_installed? { brew list | grep -x $1 >/dev/null 2>&1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# xcode install | |
# brew install | |
# http://mxcl.github.io/homebrew/ | |
# git install | |
# https://help.github.com/articles/set-up-git | |
# brew install rbenv && ruby-build | |
# https://github.com/sstephenson/ruby-build | |
# install sublime text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i '' -e 's/#port = 5432/port = 50725/' local/var/pgsql/data/postgresql.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# see also ... | |
# https://github.com/git/git/blob/master/git-sh-setup.sh#L168 | |
# Verify this repository has a clean work tree. | |
# Return false (= 0), if there are any unstaged/ uncommitted changes. | |
# Return true (= 1), if there are no changes in the repository. | |
has_clean_work_tree () { | |
git rev-parse --quiet --verify HEAD &> /dev/null || return 0 # false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
file=$1 | |
to=$2 | |
wait_seconds=$3 # optional | |
[[ $file == "" ]] && echo "No file given." && exit 1 | |
[[ $wait_seconds == "" ]] && wait_seconds=10 | |
[[ $to == "" ]] && echo "Wait for file to appear or disappear?" && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1) | |
echo "$(date +%y)$(openssl rand -hex 4)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# curl https://gist.github.com/mattes/6989885/raw/rbenv-install.sh | bash | |
if [[ $(uname) == "Darwin" ]]; then | |
brew install rbenv ruby-build | |
echo "Add the following to ~/.bash_profile ..." | |
echo 'eval "$(rbenv init -)"' | |
else | |
# linux ... |