git stash when you have a bunch of local files that are ignored git stash pop will refuse to un-stash your saved changes. This command cleans that up.
git stash pop 2>&1 | grep already | cut -d' ' -f1 | xargs rm && git stash pop
This is what I came up with. I’m not in love with it but it works ok so far!
It reads a file that looks like this:
and emits a file that looks like this:
Updated from a few years ago: http://bluebones.net/2015/12/things-i-absolutely-must-do-on-a-new-mac/
- Upgrade to latest OSX.
- Dock: remove everything, hiding on, magnification on.
- Solarized theme for Sublime Text 3 (after installing Package Control).
- Sublime git ignorer (to have ST3 respect .gitignore in searches, etc.) via Package Control.
- Hide Desktop icons.
$ defaults write com.apple.finder CreateDesktop false
$ killall Finder
- Alfred (and give it Accessibility access, add license key).
- Solarized theme for Terminal.
- “Use Option as Meta Key” in Terminal to make left Alt work as Esc.
- Homebrew. (Installs OSX commandline tools.)
- Change all .txt to open with Sublime Text.
- Show hidden files in Finder. Cmd-Shift-.
- Wine + MTGO: https://github.com/pauleve/docker-mtgo/wiki/macOS:-installing-MTGO-using-Wine
- Chrome. (Log in to Chrome to get uBlock Origin and other extensions.)
- mysql/mariadb (via homebrew).
- rtm-cli (via homebrew).
outlived.bluebones.net – The site that tells you whom you have outlived.
“Schools are places where you send your children to be brought up by other children.”
Bad: ORDER BY RAND() LIMIT N
Don’t pick random numbers from 1 to MAX(id) – deleted rows will be null or result in you getting less rows than you want. Who says your id is even sequential/numeric?
OK: SELECT id FROM table
If you have a gargantuan resultset even SELECT COUNT(*) might be slow. What would you do then?
Backticks around the reserved word.
myJavaLibObject.in(…) in Kotlin. You’ll get “Element expected” because
in is a reserved word in Kotlin. Instead you need backticks:
myJavaLibObject.`in`(…) will do the trick.