gitk
is useful for visualizing the history as a series of branching vertical lines, one commit per horizontal line:
# see history up to where I am
gitk
# see history on some other branch
gitk origin/master
On 2017-02-19 I had the honor of co-presenting with Jess Kahn at the HIMSS Cloud Computing Forum. We presented some slides about the learnings of building the next-generation Medicaid data warehouse on Amazon Web Services. I am not a Federal employee; I work at Nuna, subcontracted to QSSI to do this work.
Following are some quick thoughts and notes expanding on the presentation in
Building from source without homebrew or any other package manager.
Download the latest version of the [https://pkg-config.freedesktop.org/releases/?C=M;O=A](pkg-config source).
LDFLAGS="-framework CoreFoundation -framework Carbon" ./configure --with-internal-glib
make
sudo make install
import collections | |
Thing = collections.namedtuple('Thing', 'x y z a b c') | |
def get_by_id(db, thing_id): | |
columns = ','.join(Thing._fields) # "x,y,z,a,b,c" | |
qry = 'SELECT {} FROM things WHERE id=?'.format(columns) | |
row = db.execute(qry, (thing_id,)).fetchone() | |
return Thing(*row) # construct by expanding arguments |
Let's say you want to write a comparator function that takes two objects.
def is_newer(older, newer):
return older.timestamp < newer.timestamp
def keep_newer(file1, file2):
if is_newer(file1, file2):
os.unlink(file1)
else:
The new user profile menu in Chrome is terrible. Instead of easily-distinguishable icons, you now get a generic gray text button of the first name of your account, which is usually the same between work and personal accounts. The whole point is to easily see which profile you're currently using, and this isn't possible with the new UI. UX FAIL!
You need to cut and paste this link into Chrome.
"""diff output of multiple processes and exit as soon as one line is different | |
Note: we have to take care to not trigger any of Python's internal buffering mechanisms. | |
""" | |
import itertools | |
import subprocess | |
import sys | |
LINE_BUFFERED = 1 |
Text looks beautiful on MacBook Retina displays. You can use pretty much any monospace font, anti-aliased, and it will be quite readable for coding on your laptop's screen at 220 ppi. However, if you attach something with less than half that density, for example, the 93 ppi Dell U2414H (23.8" diagonal 1920 x 1200) then you get mushy fonts again.
Below are instructions for installing a pixel-perfect bitmap font which will give you back crisp text on both the external and internal Retina display and greatly reduce eye strain.
Download and install ProggyFont TrueType Font.
" add to ~/.vim/gvimrc
Mac OS X
When you install MacVim, you have the option of installing command line integration. This basically puts an mvim
shell script somewhere in your path, usually /usr/local/bin/mvim
. Git has a list of mergetools that it knows about; gvimdiff
is in the list, which expects gvim
to be in the path.
First, figure out where your mvim
script lives, then add a gvim
link.
$ which mvim
/usr/local/bin/mvim
$ cd /usr/local/bin
$ ln -s mvim gvim
$ ls -l gvim