Doing It Wrong
projects
- pushed
gimme
to GitHublate last nightearly this morning – https://github.com/KylePDavis/gimme
personal
- taking vacation Friday and Monday so I will probably get more done on my pet projects
random
I just realized that I’ve been using my earbuds (from Apple, came with my iPhone 6 Plus) all wrong.
Maybe you have too – find out:
- push them all the way in
- then pull them back out just slightly
- rotate them until the sound is at it’s peak quality and volume
- figure out how to do this every time
protips
bash
:- open the current line in your
$EDITOR
by pressingCtrl-X
thenCtrl-E
- string manipulation (faster though admittedly a bit cryptic)
${FILE##*/}
- likebasename
; removes longest leading*/
${FILE%/*}
- likedirname
; removes longest trailing/*
- the
for
loop defaults to iterating over the"$@"
list so you can simply sayfor ARG; do
to loop over all args - use the
[[
rather than the[
– it has more features and fewer edge cases shellcheck
yo self before you shell wreck yo self-
read
ing is fundamentalX $ find . -type f | while read F # wrong: splits on IFS (whitespaces) √ $ find . -type f | while read -r F # CORRECT! DO THIS!! ONLY!!!
- open the current line in your