Where I'm Calling From, Raymond Carver

Frank Martin uncrosses his arms and takes a puff on the cigar. He lets the smoke carry out of his mouth. Then he raises his chin toward the hills and says, “Jack London used to have a big place on the other side of this valley. Right over there, behind that green hill you’re looking at. But alchohol killed him. Let that be a lesson. He was a better man than any of us....

August 28, 2022 · 2 min · Me

Git

Pull changes in from master that have happened since making changes on feature branch git checkout feature git rebase master Merge feature branch into master To merge a feature into master, first commit changes to your feature branch, then: git checkout master git pull origin master git merge feature git push origin master See history git log to see all. Include file if you only want to see history for that file: git log [filename]

March 22, 2022 · 1 min · Me

bash

At the moment, this is just a dumping ground for useful tidbits I find / need in my daily work. At some point I will get around to organizing and formalizing. Parameter Expansion Bash reference manual Slice a string a="teleport" b=${a:4:7} echo $b > port Replace a portion of a string The pattern is ${parameter/pattern/string} to replace the first occurence of pattern with string or ${parameter//pattern/string} to replace all occurrences....

March 10, 2022 · 1 min · Me

vim

At the moment, this is just a dumping ground for useful tidbits I find / need in my daily work. At some point I will get around to organizing and formalizing. File formats (carriage returns) If you ever diff two files that look identical, but they display as completely different, you may be dealing with a file format issue. This may happen if you are sharing files between different OS. To display the file format of your current file type this:...

March 10, 2022 · 2 min · Me

awk

Basic syntax awk [ options ] script filename Where script is either a single awk command or file of awk commands. Awk commands look like this: TODO and filename can be omitted if you’re piping in standard input. Commands Options Examples Length of the longest line in a file awk '{ if (length($0) > max) max = length($0) }; END { print max }' file Selecting, filtering, and basic arithmetic Sum a field, specify delimiter awk -F '\t' '{print sum+=$1;} END {print sum}' file....

February 7, 2022 · 1 min · Me

Sed

This is an ongoing work in progress, please let me know if you have any suggestions/feedback. Basic syntax sed [ options ] script filename Where script is either a single sed command or file of sed commands (must use with -f option). Sed commands look like this: action/pattern/replacement/flag Filename can be omitted if you’re piping in standard input. Actions p: print s: substitute s accepts the following flags which are appended to the end of the command (e....

January 30, 2022 · 2 min · Me

2021-06-22

2021-06-22 Articles This article on Patrick Collison, Tyler Cowen and Patrick Jay’s reflections on the Fast Grants program they started to fund COVID related research during the pandemic. This quote stands out: Scientists are in the paradoxical position of being deemed the very best people to fund in order to make important discoveries but not so trustworthy that they should be able to decide what work would actually make the most sense!...

June 22, 2021 · 4 min · Me

Confusion

Confusion I am working through a task at work of reproducing a dataset using a long SQL script consisting of separate chunks of data manipulation and manual edits (to the data table, not the code). As often happens, documentation is less than perfect and I am left to figure out much of what I am doing in my own. This naturally leads to some confusion - what should I be looking for, how do I find an issue to correct, how should I correct the issue when I find it etc....

May 20, 2021 · 2 min · Me

Orchestration and Demonstration or How to not be an Awkward Host

I put the questions to some friends of mine gathered for a barbeque today: how do we know what is proper social etiquette. Or maybe, the less boozhy way to put it is, how do we know how to behave around others? I often feel this most acutely when having people over for a meal, when it comes time to eat. I have been running around - chopping, toasting, tasting, roasting - and all of a sudden it’s time to eat and everyone is milling about, chatting, drinking and (hopefully) enjoying themselves, just as guests should be....

May 20, 2021 · 2 min · Me

Focus

Focus To what extent can we manufacture focus (asking for a friend :tongue_in_cheek_emoji:) Canonical answers: Develop habits (if you get used to doing the same thing every day out will get easier to do the same thing every day) Organize your physical environment to minimize distraction and promote concentration Minimize your ambition set (i.e. Don’t have to many goals) Take care of your mental and physical needs (sleep, exercise, etc) My strategy:...

May 16, 2021 · 1 min · Me