Skip to content

Instantly share code, notes, and snippets.

@ryan-miller
ryan-miller / .bash_profile
Last active December 27, 2015 00:18
.bash_profile mostly for alias commands
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
# Alias commands
alias spotlight_start='sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist'
alias spotlight_stop='sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist'
alias tomcat_start='sudo /usr/local/tomcat/bin/startup.sh'
alias tomcat_stop='sudo /usr/local/tomcat/bin/shutdown.sh'
alias trash_empty='sudo rm -rf ~/.Trash/*'
alias dock_kill='sudo killall -KILL Dock'
alias finder_showall='defaults write com.apple.finder AppleShowAllFiles ON; killall Finder'
@ryan-miller
ryan-miller / gist:6062504
Created July 23, 2013 13:53
simple object introspection (not introspection of a simple object)
for (var element in myObject) {
switch (typeof myObject[element]) {
case "string":
console.log(element + ': ' + myObject[element])
break
case "object":