Skip to content

Instantly share code, notes, and snippets.

@kcrwfrd
Created June 7, 2013 08:02
Show Gist options
  • Save kcrwfrd/5727718 to your computer and use it in GitHub Desktop.
Save kcrwfrd/5727718 to your computer and use it in GitHub Desktop.
home dotfiles
# Custom bash prompt
export PS1="\u@\h:\w$ "
# Add /usr/local/bin to path for Homebrew
export PATH="/usr/local/bin:/usr/local/share/npm/bin:/usr/local/sbin:~/bin:$PATH"
# Enable shims and auto-complete for rbenv
eval "$(rbenv init -)"
# Postgres
alias pg='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log'
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# General UI/UX #
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
sudo scutil --set ComputerName "Kevin's Macbook Pro"
sudo scutil --set HostName "Kevins-Macbook-Pro.local"
sudo scutil --set LocalHostName "Kevins-Macbook-Pro"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "Kevins-Macbook-Pro"
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable automatic termination of inactive apps
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment