Skip to content

Commit

Permalink
Add some bin scripts, remove some scripts, update some scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggamel committed Jan 15, 2013
1 parent fc3a3c4 commit a95a563
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 196 deletions.
39 changes: 39 additions & 0 deletions bin/backup
@@ -0,0 +1,39 @@
#!/bin/sh
IFS=$'\n'

# Copies a few key files to a mounted partition.
#
# I use Time Machine for backups, but I also wanted to build out an
# offsite backup with my critical nonreplaceable data (photos, documents,
# etc). Since it's mobile, encryption is a plus (which Time Machine
# doesn't easily do). I create an encrypted sparsebundle on a tiny USB
# drive and do it to it.


# Your sparsebundle. I named mine "fuckplanets" because really, fuck planets.
sparsebundle="/Volumes/fuckplanets/backup.sparsebundle"

# Your destination. My sparsebundle mounts to "backup".
backup_location="/Volumes/backup"

# Directories to backup. Recursive, implied home (~) location.
directories=(
Code
Documents
"Library/Application Support/Adium 2.0"
Movies
Music
Pictures
)



hdiutil attach -noverify $sparsebundle

for directory in ${directories[@]}
do
rsync -avh --progress --delete ~/$directory $backup_location
done

hdiutil detach $backup_location
diskutil eject fuckplanets
111 changes: 0 additions & 111 deletions bin/chromium_updater

This file was deleted.

62 changes: 0 additions & 62 deletions bin/cloudapp

This file was deleted.

15 changes: 15 additions & 0 deletions bin/dot
@@ -0,0 +1,15 @@
#!/bin/sh
#
# dot
#
# `dot` handles installation, updates, things like that. Run it periodically
# to make sure you're on the latest and greatest.

# Set OS X defaults
$ZSH/osx/set-defaults.sh

# Upgrade homebrew
brew update

# Install homebrew packages
$ZSH/homebrew/install.sh 2>&1
7 changes: 3 additions & 4 deletions bin/e
Expand Up @@ -14,9 +14,8 @@
# $ e /usr/local # $ e /usr/local
# # => opens the specified directory in your editor # # => opens the specified directory in your editor


if test "$1" == "" if [ "$1" == "" ] ; then
then exec $EDITOR .
$($EDITOR .)
else else
$($EDITOR $1) exec $EDITOR "$1"
fi fi
44 changes: 25 additions & 19 deletions bin/getlyrics
Expand Up @@ -53,24 +53,30 @@ cache_dir=~/.dotfiles/caches/getlyrics
[[ -e "$cache_dir" ]] || mkdir -p "$cache_dir" [[ -e "$cache_dir" ]] || mkdir -p "$cache_dir"


# Let's intro with some ASCII, because why the hell not? # Let's intro with some ASCII, because why the hell not?
gltitle=" getlyrics_art () {
############################################################################# echo "buttes"
# * * # }
# * ____ _ _ * _ * # getlyrics_art
# / ____| | | | | (_) * #
# | | __ ___| |_| | _ _ _ __ _ ___ ___ * #
# | | |_ |/ _ | __| | | | | | '__| |/ __/ __| # # gltitle="
# | |__| | __| |_| |___| |_| | | | | (__\__ \ * * # # #############################################################################
# \_____|\___|\__|______\__, |_| |_|\___|___/ # # # * * #
# * __/ | * * # # # * ____ _ _ * _ * #
# * * |___/ * # # # / ____| | | | | (_) * #
# * * # # # | | __ ___| |_| | _ _ _ __ _ ___ ___ * #
############################################################################# # # | | |_ |/ _ | __| | | | | | '__| |/ __/ __| #
" # # | |__| | __| |_| |___| |_| | | | | (__\__ \ * * #
echo "$gltitle" # # \_____|\___|\__|______\__, |_| |_|\___|___/ #
linebreak=" # # * __/ | * * #
############################################################################# # # * * |___/ * #
" # # * * #
# #############################################################################
# "
# echo "$gltitle"
# linebreak="
# #############################################################################
# "


# Player states # Player states
# - iTunes states = 'stopped', 'playing' # - iTunes states = 'stopped', 'playing'
Expand Down Expand Up @@ -117,7 +123,7 @@ for player in "${players[@]}"; do


# OPTIONAL: Send lyrics to CloudApp and copy url to clipboard # OPTIONAL: Send lyrics to CloudApp and copy url to clipboard
# Comment out to not use. Uncomment to use. # Comment out to not use. Uncomment to use.
cloudapp "$file" && echo "$linebreak" cloudapp upload "$file" && echo "$linebreak"


# Let's pause for a moment # Let's pause for a moment
sleep 1 sleep 1
Expand Down

0 comments on commit a95a563

Please sign in to comment.