Skip to content

Instantly share code, notes, and snippets.

@christopher-baek
christopher-baek / .Find the Wi-Fi Password for Your Current Network with the Command Line.md
Created April 3, 2016 21:48
Find the Wi-Fi Password for Your Current Network with the Command Line
@christopher-baek
christopher-baek / .Disable Lid Close Sleep on Ubuntu Server.md
Last active April 3, 2016 21:39
Disable Lid Close Sleep on Ubuntu Server

Disable Lid Close Sleep on Ubuntu Server

@christopher-baek
christopher-baek / .Install sdkman to Custom Directory.md
Last active April 3, 2016 21:40
Install sdkman to Custom Directory
@christopher-baek
christopher-baek / .Install nvm to Custom Directory.md
Last active April 3, 2016 21:40
Install nvm to Custom Directory
@christopher-baek
christopher-baek / .rsync Archive With FAT Device.md
Last active April 3, 2016 21:38
rsync Archive With FAT Device

rsync Archive With FAT Device

rsync Man Page:

-a, --archive               archive mode; same as -rlptgoD (no -H)
-r, --recursive             recurse into directories
-l, --links                 copy symlinks as symlinks
-p, --perms                 preserve permissions
-t, --times                 preserve times
-g, --group preserve group
@christopher-baek
christopher-baek / .PDF CLI Manipulation Examples.md
Last active April 3, 2016 23:21
PDF CLI Manipulation Examples

PDF CLI Manipulation Examples

@christopher-baek
christopher-baek / .Setting Environment Variables in OS X Yosemite.md
Last active May 11, 2022 06:46
Setting Environment Variables in OS X Yosemite

Setting Environment Variables in OS X Yosemite

shell

  • Terminal apps in OS X (Terminal, iTerm, etc.) process terminals as login shells, so these variables should be set in the ~/.bash_profile and not the ~/.bashrc file.

system (including GUI apps)

  • Create a ~/Library/LaunchAgents/environment.variables.plist file to have launchd run a script at login that will set environment variables
  • Create a /usr/local/bin/set-environment-variables.sh script (or wherever configured in the *.plist file) and "export" the environment variables here (bash syntax like "export JAVA_HOME ..." doesn't work here)
  • Register the *.plist file with launchd