Skip to content

Instantly share code, notes, and snippets.


Stuart P. Bentley stuartpb

View GitHub Profile
stuartpb /
Last active Nov 16, 2019
David Holmes opening statement




View slic3r_errors.txt
/tmp/.mount_Slic3rC132Lw/usr/bin/slic3r.wrapper: line 125: 32119 Aborted (core dumped) LD_LIBRARY_PATH="" zenity --question --title="$TITLE" --text="$TEXT" 2> /dev/null
/tmp/.mount_Slic3rC132Lw/usr/bin/slic3r.wrapper: line 125: 32124 Aborted (core dumped) LD_LIBRARY_PATH="" zenity --question --title="$TITLE" --text="$TEXT" 2> /dev/null
Creating main frame...
( Gtk-CRITICAL **: 11:28:34.612: IA__gtk_color_button_set_color: assertion 'color != NULL' failed
** ( WARNING **: 11:28:34.869: Pixbuf theme: Cannot load pixmap file /usr/share/themes/Adwaita/gtk-2.0/assets/treeview-separator-ltr.png: Couldn’t recognize the image file format for file “/usr/share/themes/Adwaita/gtk-2.0/assets/treeview-separator-ltr.png”
( GdkPixbuf-CRITICAL **: 11:28:34.869: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

Keybase proof

I hereby claim:

  • I am stuartpb on github.
  • I am stuartpb ( on keybase.
  • I have a public key whose fingerprint is 03A0 8855 B413 1748 7D1E 6690 FF04 2AE3 ECE2 8BA9

To claim this, I am signing this object:

stuartpb /
Created Aug 17, 2016
Original version of markusfisch/ShaderEditor#10#issuecomment-240450626

What that means is, while a mediump can contain a value up to 1024 without losing integral precision (the next increment it will be able to represent is 1026), it can only represent fractions of any granularity for much smaller ranges - from 513 to 1024, it'd be wholes, 256 to 512 it'd be halves, 128 to 256 quarters, 64 to 128 eighths, 32 to 16 the largest fractions would be sixteenths. Only values absolutely smaller than 8 are precise to the 1/32, smaller than 4 1/64, smaller than 2 1/128, and only fractions below a whole are precise to 1/256 (2^-8) - fractions of precision 2^-9 or 2^-10 only being under a half and a quarter, respectively (and fractions beyond that having no guarantees of precision per the spec). (Conversely, 1026 to 2048 will jump by twos, 2052 to 4096 by fours, 4104 to 8192 by eights, and 8208 to 16384 by sixteens.)

(FAKE EDIT: I just checked the OP, and what I'm about to describe doesn't quite match its figures, though that could just be because I'm bad at estimating framerates.

stuartpb / simplifyMLZPath.js
Last active May 5, 2020
JavaScript to simplify uniform SVG paths
View simplifyMLZPath.js
// run on
var tolerance = 5;
function simplifyMLZPath(path) {
var polys = JSON.parse('[['+path
var segments = [];
stuartpb /
Created Oct 2, 2015
Script to make a new Arch Linux for Raspberry Pi image
# Packages required
# dosfstools parted
# Can be run on any Linux system
echo "creating image to fit on 1Gb card"
dd if=/dev/zero of=arch-rpi.img bs=1M count=925
echo "Partitioning"
stuartpb /
Last active Jan 13, 2016 — forked from mbostock/.block
Natural Earth
stuartpb /
Last active Aug 29, 2015 — forked from mnot/
Transcript of Edward Snowden's comments at IETF93.
You can’t perform that action at this time.