Logs | Page 2 of 8

These logs are random snippets of information that have been useful to me in the past. Hopefully they help you too!


Making sudo pip use a different HOME

Test whether or not sudo is using the environment you expect by creating a small test script with echo $HOME for instance, and then running it as sudo bash t...

PEP8-style indentation in vim

How do you automatically get vim to do PEP8-style indentation for python code? Look up this blog post which references this vim script. It has also been adde...

Setting AFS permissions recursively

In order to recursively set AFS ACL permissions for a directory, you need to manually use find -exec as follows: find <dir> -type d -exec fs sa {} <...

Git notes

You can find a good reference for git notes here. Also, of course, git help notes. Notes can be used, for instance, to add extra information to a commit with...

Exporting multi-page pdfs with GIMP

Gimp imports multi-page pdfs as one layer-per-page. But it does not re-export multi-layer figures as a multi-page pdf, with one page-per-layer. It just expor...

Linear regression in numpy and scipy

Note that there are multiple numpy/scipy functions that do regression, fitting, etc. Of these, scipy.stats.linregress fits a line and forces an intercept. Yo...

Remapping PrtSc to Menu

Remapping PrtSc to Menu requires that you define your own xkb modification. I have added the modified versions of the relevant configuration files to the mis...

Making xkb modifications permanent

How do you make the settings described in the previous log message permanent? The first thing you need to do is to install dconf-editor. Open it up and go to...