Permalink
Browse files

UPDATES!1

  • Loading branch information...
1 parent 831ed28 commit 1efdbb1f06a86ee06af67b0e4c9c97bb990735b1 @dflems committed Jan 11, 2013
View
@@ -1,11 +1,26 @@
## dflems' dotfiles
-Based on [holman](http://github.com/holman)/[dotfiles](http://github.com/holman/dotfiles). Stole a few of his scripts and the neat-o bootstrapping logic. Also stole a buncha cool scripts from [rtomayko](https://github.com/rtomayko)/[dotfiles](https://github.com/rtomayko/dotfiles).
+Mostly based on [holman's](http://github.com/holman) topically-organized dotfiles. They're using his bootstrapping Rakefile, but I may change that out in the future for something with little or no dependencies. There's a bunch of stuff in here that's specific to my setup (my `.gitconfig` for instance). Right now, this setup is tailored for OSX. Right now, my ZSH config and prompt relies on having [rbenv](https://github.com/sstephenson/rbenv) installed and initialized. That too may change.
-## install
+## what's it gonna do?
+* Install [Homebrew](http://mxcl.github.com/homebrew) and dependencies ([grc](http://korpus.juls.savba.sk/~garabik/software/grc.html), [coreutils](http://www.gnu.org/software/coreutils)).
+* Symlink each `FILENAME.symlink` to `~/.FILENAME`.
+* Every `*.zsh` file will get sourced.
+* Autocompletion loaded from `completion.zsh` files in topic folders.
+* Source `~/.localrc` for super secret stuff that you don't want to put on the internets.
+* Aliases `git` to `hub` for easier Github integration.
+
+## install it
```sh
git clone https://github.com/dflems/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
script/bootstrap
```
-PWOMP!
+## .dotfiles of interest
+* [dotfiles.github.com](http://dotfiles.github.com): Growing list of resources (follow [@octodots](http://www.twitter.com/octodots))
+* [holman/dotfiles](http://github.com/holman/dotfiles): Bootstrapping, topicality, ZSH config, vim config
+* [rtomayko/dotfiles](https://github.com/rtomayko/dotfiles): Some scripts (and symlinking `bitch,` to `sudo`. Genius.)
+* [garybernhardt/dotfiles](https://github.com/garybernhardt/dotfiles): Git scripts and gitconfig. Great stuff. A+ would recommend.
+
+## todo
+* Sublime Text 2 settings
View
@@ -30,7 +30,7 @@ task :install do
FileUtils.rm_rf(target) if overwrite || overwrite_all
`mv "$HOME/.#{file}" "$HOME/.#{file}.backup"` if backup || backup_all
end
- `ln -s "$PWD/#{linkable}" "#{target}"`
+ `ln -s "$PWD/#{linkable}" "#{target}"` if !skip_all
end
end
@@ -55,4 +55,3 @@ task :uninstall do
end
task :default => 'install'
-
View
@@ -3,7 +3,4 @@
# Show IPv4 address for interface <if> or all interfaces with
# no <if> given.
-ifconfig -a |
-grep 'inet ' |
-grep broadcast |
-awk '{ print $2 }'
+ifconfig -a | grep 'inet ' | awk '{ print $2 }'
View
21 bin/e
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Quick shortcut to an editor.
+#
+# This means that as I travel back and forth between editors, hey, I don't have
+# to re-learn any arcane commands. Neat.
+#
+# USAGE:
+#
+# $ e
+# # => opens the current directory in your editor
+#
+# $ e .
+# $ e /usr/local
+# # => opens the specified directory in your editor
+
+if [ "$1" == "" ] ; then
+ exec $EDITOR .
+else
+ exec $EDITOR "$1"
+fi
View
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+for X in `ps ax | grep -i $1 | awk {'print $1'}`; do
+ kill $X;
+done
View
@@ -42,4 +42,4 @@ test -z "$res" && {
exit 1
}
-echo "$res"
+echo "$res"
View
@@ -8,7 +8,7 @@
# http://gist.github.com/287717
exec sh -c "tail -n +$(($LINENO + 2)) < $0 | sed s/DATE/$(date +%Y)/"
-Copyright (c) DATE Ryan Tomayko <http://tomayko.com/about>
+Copyright (c) DATE Dan Fleming <http://dfle.ms/about>
Permission is hereby granted, free of charge, to any person ob-
taining a copy of this software and associated documentation
View
@@ -1,3 +1,2 @@
#!/bin/sh
-/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession \
- -suspend
+/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend
View
@@ -1,17 +0,0 @@
-#!/bin/sh
-#/ Usage: lsrb <file>...
-#/ List class, module, and method definitions in Ruby <file>.
-set -e
-
-# show usage
-[ -z "$1" -o "$1" = "--help" ] && {
- grep ^#/ <"$0" |cut -c4-
- exit 2
-}
-
-# run over files and grep out interesting bits
-for f in "$@"
-do echo "$f:"
- grep -e '^[ ]*\(class\|module\|def\|alias\|alias_method\) ' "$f" |
- sed 's/^/ /'
-done
View
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ $# = 0 ] ; then
- echo "usage: orig FILE ..."
- echo "copy FILE(s) to FILE.orig"
-else
- for f in "$@" ; do
- cp -p "$f" "$f.orig"
- done
-fi
View
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+if [[ ! "$1" || "$1" == "-h" || "$1" == "--help" ]]; then cat <<HELP
+Create an OS X "USB Install Stick" from InstallESD.dmg
+http://benalman.com/
+
+Usage: sudo $(basename "$0") source_image target_path
+
+Before running this script, open Disk Utility and partition a USB Stick like:
+ * 1 Partition
+ * Options -> GUID Partition Table
+ * Mac OS Extended (Journaled)
+ * Name: Foobar
+
+Then run this script like: sudo $(basename "$0") InstallESD.dmg /Volumes/Foobar
+
+Copyright (c) 2012 "Cowboy" Ben Alman
+Licensed under the MIT license.
+http://benalman.com/about/license/
+HELP
+[[ "$1" ]]; exit; fi
+
+dmg_path="$1"
+usb_path="${2%/}"
+
+[[ $UID != 0 ]] && echo "Error: please run with sudo" && exit 1
+[[ ! -e "$dmg_path" ]] && echo "Error: source \"$dmg_path\" not found" && exit 2
+[[ ! -e "$usb_path" ]] && echo "Error: target \"$usb_path\" not found" && exit 3
+
+usb_device="$(df | grep -w "$usb_path" | awk '{print $1}')"
+
+# Mount image (invisibly)
+dmg_mount="$(hdiutil attach "$dmg_path" -nobrowse | perl -ne 'm#(/Volumes/.*)# && print $1')"
+
+# Restore image
+asr -restore -source "$dmg_path" -target $usb_device -erase -format HFS+
+
+# Unmount image
+hdiutil detach "$dmg_mount"
+
+# Mount usb stick (invisibly)
+hdiutil attach $usb_device -nobrowse
+
+usb_name="$(diskutil info $usb_device | perl -ne 'm#Volume Name:\s+(.*)# && print $1')"
+usb_mount="$(diskutil info $usb_device | perl -ne 'm#Mount Point:\s+(.*)# && print $1')"
+final_name="$(basename "$usb_mount/Install "*.app .app)"
+
+# Add a drive icon (note: 1024x1024 icons don't appear in the boot screen on older macs)
+srcicon=("$usb_mount"/*.app/Contents/Resources/InstallAssistant.icns)
+volicon="$usb_mount/.VolumeIcon.icns"
+cp "$srcicon" "$volicon"
+
+# Set some properties to ensure the icon works
+SetFile -c icnC "$volicon"
+SetFile -a C "$usb_mount"
+
+# Give it the proper boot screen name and keep the folder from auto-opening
+bless --folder "$usb_mount" -label "$final_name"
+
+# Rename drive
+diskutil rename "$usb_name" "$final_name"
+
+# Re-mount usb stick so that it's visible
+diskutil unmount $usb_device
+hdiutil attach $usb_device
View
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# Quick search in a directory for a string ($1).
-#
-set -e
-
-# use -iru to search directories ack usually ignores (like .git)
-ack -i $1
View
@@ -0,0 +1,26 @@
+#!/bin/sh
+# credit: http://nparikh.org/notes/zshrc.txt
+# Usage: smartextract <file>
+# Description: extracts archived files / mounts disk images
+# Note: .dmg/hdiutil is Mac OS X-specific.
+
+if [ -f $1 ]; then
+ case $1 in
+ *.tar.bz2) tar -jxvf $1 ;;
+ *.tar.gz) tar -zxvf $1 ;;
+ *.bz2) bunzip2 $1 ;;
+ *.dmg) hdiutil mount $1 ;;
+ *.gz) gunzip $1 ;;
+ *.tar) tar -xvf $1 ;;
+ *.tbz2) tar -jxvf $1 ;;
+ *.tgz) tar -zxvf $1 ;;
+ *.zip) unzip $1 ;;
+ *.ZIP) unzip $1 ;;
+ *.pax) cat $1 | pax -r ;;
+ *.pax.Z) uncompress $1 --stdout | pax -r ;;
+ *.Z) uncompress $1 ;;
+ *) echo "'$1' cannot be extracted/mounted via smartextract" ;;
+ esac
+else
+ echo "'$1' is not a valid file"
+fi
View
@@ -0,0 +1,8 @@
+alias pg-up='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'
+alias pg-down='pg_ctl -D /usr/local/var/postgres stop -s -m fast'
+
+alias redis-up="redis-server $ZSH/db/redis.conf > /dev/null &"
+alias redis-down='killall redis-server'
+
+alias mysql-up='mysql.server start'
+alias mysql-down='mysql.server stop'
Oops, something went wrong.

0 comments on commit 1efdbb1

Please sign in to comment.