Skip to content

Instantly share code, notes, and snippets.


Will Furnass willfurnass

View GitHub Profile
kuznero /
Last active March 12, 2023 16:48
Cleanup docker images and containers after failed builds

Cleanup docker images and containers after failed builds

Sometimes, there are some untagged images left behind after failed builds. In order to get rid of those, this script can be used.

docker rm $(docker ps -aq)
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
drj11 /
Last active March 10, 2016 15:26
R code cafe notes

no-one is using the etherpad.

by 1745 (15 minutes in) some people had made a plot, most people downloading and installing.

by 1800 (30 minutes in), many people have a plot.

installing on arch and gentoo is hard (arch user gave up installing Rstudio and used command line; gentoo user had to use VNC!). Installing on Ubuntu was hard too.

Someone asked "what does pch=1 do?" (in the call to legend)

bnagy /
Last active December 29, 2022 15:51
Mutt, Gmail and GPG

GPG / Mutt / Gmail


This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
takluyver /
Created September 6, 2014 21:44
Flatten notebooks for git diff

Copy to somewhere on $PATH. Then, in the root of a git repository, run these commands:

echo "*.ipynb diff=ipynb" >> .gitattributes 
git config diff.ipynb.textconv

When you change a notebook and run git diff, you'll see the diff of flattened, simplified notebooks, rather than the full JSON. This does lose some information (metadata, non-text output), but it makes it easier to see simple changes in the notebook.

This doesn't help with merging conflicting changes in notebooks. For that, see

grugq / gist:03167bed45e774551155
Last active February 26, 2023 22:42
operational pgp - draft
View gist:03167bed45e774551155

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

minrk / nbstripout
Last active September 24, 2022 05:36
git pre-commit hook for stripping output from IPython notebooks
View nbstripout
#!/usr/bin/env python
"""strip outputs from an IPython Notebook
Opens a notebook, strips its output, and writes the outputless version to the original file.
Useful mainly as a git filter or pre-commit hook for users who don't want to track output in VCS.
This does mostly the same thing as the `Clear All Output` command in the notebook UI.
LICENSE: Public Domain
ryangomba /
Last active September 26, 2021 07:17
OPTICS clustering in Python
# Copyright (c) 2012, Ryan Gomba
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation