Skip to content

Instantly share code, notes, and snippets.

View 20015jjw's full-sized avatar

Will J 20015jjw

  • Instagram
  • San Francisco Bay Area
View GitHub Profile
@20015jjw
20015jjw / gist:08db8dbb801c29706e76
Last active May 10, 2016 18:01
Add these lines to .bash_profile to allow iterm2 to switch profiles with the time in the day.
# Define a function that switches iterm profile
iterm2_profile() { echo -e "\033]50;SetProfile=$1\a"; }
# Change profile by $HOUR
# You'll need to change name of profiles to Light and Dark
HOUR=`date +"%H"`
if [ $HOUR -gt 6 ] && [ $HOUR -lt 18 ];
then iterm2_profile Light;
else iterm2_profile Dark;
fi
@20015jjw
20015jjw / .bash_profile
Last active August 28, 2015 19:16
CS162 .bash_profile
export PATH="/usr/local/bin:$PATH"
export PATH=$PATH:/Users/will/Library/Android/sdk/platform-tools
# enable / disable internal keyboard
alias keyboard_disable="sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/"
alias keyboard_enable="sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/"
# function to change iterm2 profiles
iterm2_profile() { echo -e "\033]50;SetProfile=$1\a"; }
@20015jjw
20015jjw / mouse_acc.bash
Created October 17, 2015 23:14
OS X simple mouse acceleration switch
mouse_acc () {
if [ $1 = "enable" ]
then
echo "Mouse Acceleration Enabled; Log back in please;"
defaults write .GlobalPreferences com.apple.mouse.scaling 0
elif [ $1 = "disable" ]
then
echo "Mouse Acceleration Disabled; Log back in please;"
defaults write .GlobalPreferences com.apple.mouse.scaling -1
else
@20015jjw
20015jjw / python3.3.4.rb
Last active January 19, 2016 00:41
python3.3.4.rb
class Python3 < Formula
desc "Interpreted, interactive, object-oriented programming language"
homepage "https://www.python.org/"
url "https://www.python.org/ftp/python/3.4.4/Python-3.4.4.tar.xz"
sha256 "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"
bottle do
revision 1
sha256 "d748217b106fd30cfff4c5ea5e403acc76059783e21a5b4247f95f2f6bb6bf5b" => :el_capitan
sha256 "a8a8dc876ae4eec188b3beb4afb9f6c67ffa905eb32fdd7f02b4945a11a045a1" => :yosemite