Skip to content

Instantly share code, notes, and snippets.

@marando
marando / git.md
Created December 3, 2021 01:09
Random Git Snippets

Random Git Snippets

Archive a Branch

  1. Switch to the main branch:
    git checkout master
git clone https://github.com/tensorflow/tensorflow
cd tensorflow
git checkout r1.0
sudo apt-get install openjdk-8-jdk
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install bazel
@marando
marando / README.md
Created June 18, 2016 02:06
Remove Non-Existent Vagrant Boxes

Remove Non-Existent Vagrant Boxes

vagrant global-status --prune

Easy Show/Hide of Hidden Files in OS X

Add this to your .bash_profile:

alias showFiles='defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO;killall Finder'

Then from a terminal just run showFiles to show hidden files and hideFiles to hide them again.

@marando
marando / README.md
Last active June 13, 2016 08:22
Enable Sublime Text 3 CLI

Enable Sublime Text 3 CLI

Setup

Symlink the CLI tool.

$ ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

Usage

  • To edit a file or open an entire directory
@marando
marando / README.md
Last active June 15, 2016 07:51
Enable Git Autocompletion

Enable Autocompletion for Git

  1. Download the git completions script.
$ curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
  1. Add the script to your ~/.bash_profile.
if [ -f ~/.git-completion.bash ]; then
@marando
marando / .bash_profile
Created June 12, 2016 18:05
Make OS X Terminal like Ubuntu
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'