Skip to content

Instantly share code, notes, and snippets.

Working from home

Rob Blackwell RobBlackwell

Working from home
View GitHub Profile
View hysthresh.jl
hysthresh(im, T1, T2)
Hysteresis thresholding
A simple port of Peter Kovesi's MATLAB method to Julia.
Usage: bw = hysthresh(im, T1, T2)
View bwselect.jl
bwselect(BW, c , r)
Select objects in a binary image.
Similar to the MATLAB function of the same name.
function bwselect(BW, c, r)
# constants
north = CartesianIndex(-1, 0)
RobBlackwell / gist:e6b874b9b664d7496f4099bae3c363f4
Created Jan 31, 2018
Preserving your working directory in gnome-terminal
View gist:e6b874b9b664d7496f4099bae3c363f4
# including this ensures that new gnome-terminal tabs keep the parent `pwd` !
if [ -e /etc/profile.d/ ]; then
. /etc/profile.d/
RobBlackwell / Pickle.jl
Created Jan 31, 2018
Access pickle files in Julia
View Pickle.jl
using PyCall
@pyimport pickle
function mypickle(filename, obj)
out = open(filename,"w")
pickle.dump(obj, out)
function myunpickle(filename)
RobBlackwell / configuration.nix
Last active Nov 24, 2020
NixOS on Dell XPS 13
View configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
imports =
[ # Include the results of the hardware scan.
View gist:d09dd9e934b3afc9721ae7c2b60cd086
nix-env -iA nixos.oraclejre8
Unfortunately, we cannot download file jdk-8u131-linux-x64.tar.gz automatically.
Please go to to download it yourself, and add it to the Nix store
using either
nix-store --add-fixed sha256 jdk-8u131-linux-x64.tar.gz
nix-prefetch-url --type sha256 file:///path/to/jdk-8u131-linux-x64.tar.gz
RobBlackwell / eduroam
Last active Mar 17, 2017
eduroam UEA on x230 arch linux
View eduroam
Description="eduroam network"
RobBlackwell / arch-linux
Last active Feb 22, 2021 — forked from njam/arch-linux
Install Arch Linux on XPS 13 9360
View arch-linux
# Arch installation on Dell XPS 13 (9360), October 2020
# Please also consult official documentation:
# Boot from the usb.
# F12 to enter boot menu
# Set UK keymap
loadkeys uk
View sbcl-on-windows-subsystem-for-linux.txt
reb@HELIUM:~$ sudo apt-get install sbcl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
Suggested packages:
View gist:dc965da495b6ed3d5bb4
pandoc --latex-engine=xelatex -V papersize:"a4paper" -V geometry:margin=1in -V fontsize:12pt -o briefing.pdf