This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -s ~/.bashrc ]] && source ~/.bashrc # load .bashrc | |
[[ -s ~/.bash_profile_instructure ]] && source ~/.bash_profile_instructure # load .bash_profile_instructure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌── ln(1) link, ln -- make links | |
│ ┌── Create a symbolic link. | |
│ │ ┌── the path to the intended symlink | |
│ │ │ can use . or ~ or other relative paths | |
│ │ ┌─────┴────────┐ | |
ln -s /path/to/original /path/to/symlink | |
└───────┬───────┘ | |
└── the path to the original file/folder | |
can use . or ~ or other relative paths |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class AppDelegate : UIApplicationDelegate | |
{ | |
UIWindow window; | |
public static UIStoryboard Storyboard = UIStoryboard.FromName ("MainStoryboard", null); | |
public static UIViewController initialViewController; | |
public override bool FinishedLaunching (UIApplication app, NSDictionary options) | |
{ | |
window = new UIWindow (UIScreen.MainScreen.Bounds); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.apple.finder CreateDesktop -bool false && killall Finder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf /usr/local/Cellar/ /usr/local/.git && brew cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You shouldn’t. | |
Homebrew intentionally keeps /usr/local/bin after /usr/bin in the path for maximum compatibility. Reversing the order of these directories in PATH by editing /etc/paths would mean that all programs anywhere on the system, no matter how they were started, will get the Homebrew version of a command. But some may specifically expect Apple’s version, or just not be able to use a newer version, etc. | |
How to preserve this principle and still get the Homebrew-installed version of git? As the saying goes, all problems can be solved with a layer of indirection (except having too many layers of indirection). — Or in this case, as it turns out, two layers. | |
Specifically, it’s been part of my Unix habits to have a ~/bin directory which I put at the start of my PATH. This is one of the first bits in my .bashrc: | |
case ":$PATH:" in | |
*:$HOME/bin:*) ;; # do nothing if $PATH already contains $HOME/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install rbenv ruby-build | |
# Add rbenv to bash so that it loads every time you open a terminal | |
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Install Ruby | |
rbenv install 2.2.2 | |
rbenv global 2.2.2 | |
ruby -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If id command returns zero, you’ve root access. | |
if [ $(id -u) -eq 0 ]; | |
then # you are root, set red colour prompt | |
PS1="\\[$(tput setaf 1)\\]\\u@\\h:\\w #\\[$(tput sgr0)\\]" | |
else # normal | |
PS1="[\\u@\\h:\\w] $" | |
fi |
OlderNewer