Skip to content

Instantly share code, notes, and snippets.

View sionleroux's full-sized avatar

Siôn le Roux sionleroux

View GitHub Profile
@sionleroux
sionleroux / 00 metadata.txt
Last active November 30, 2022 10:53
Stack trace from load image panic and possible related output from go race detector
go version go1.19.3 linux/amd64
github.com/hajimehoshi/ebiten/v2@v2.4.12
@sionleroux
sionleroux / bolt-caps.scad
Created August 9, 2021 22:01
OpenSCAD design for plastic caps to cover protruding bolts
include <ScrewsMetric/ScrewsMetric.scad>;
$fn = 30;
GHOST = false;
outer_size = 40;
difference() {
sphere(d = outer_size);
translate([-outer_size/2,-outer_size/2,0]) cube(outer_size);
translate([-outer_size/2,11,-outer_size+1]) cube(outer_size); // cut
@sionleroux
sionleroux / bump-tag.go
Created July 27, 2016 23:45
Version bump git tag in Go
package main
import (
"fmt"
"log"
"os"
"github.com/Symantec/Dominator/lib/verstr" // sorts semvers
"github.com/libgit2/git2go" // git access to read/write tags
"github.com/olivoil/bump" // semantically bump tag number
@sionleroux
sionleroux / sumAll.js
Last active February 14, 2016 14:59
Short, mathematical solution to Sum All Numbers in Range problem
function sumAll(x) {return (x[1] + x[0]) * (Math.abs(x[1] - x[0]) + 1) / 2;}
@sionleroux
sionleroux / sumAll.js
Last active January 31, 2016 21:37
Functional solution to Free Code Camp's "Sum All Numbers in a Range" challenge
function sumAll(x) {
return Array.from(
{length: Math.max(...x) - Math.min(...x) + 1},
(v,k) => k + Math.min(...x)
).reduce((s, c) => s + c)
}
R::
wasWalking := GetKeyState("w")
if wasWalking
Send {w up}
Sleep 150
Send {w down}
Sleep 20
Send {v down}
@sionleroux
sionleroux / privacy.md
Last active August 29, 2015 14:22
Guess the Animal Privacy Policy

Privacy Policy

The "Guess the Animal" game does not require, store or use your personal information in any way, it is just a small game and the only information it stores is data for questions you teach it for guessing animals.

@sionleroux
sionleroux / PKGBUILD
Created April 16, 2015 20:08
PKGBUILD for the jSSC package in AUR.
# Maintainer: Siôn Le Roux <sinisterstuf@gmail.com>
# Meta
pkgname=jssc
pkgver=2.8.0
pkgrel=1
pkgdesc="Java Simple Serial Connector; for working with serial ports from Java"
url="https://github.com/scream3r/java-simple-serial-connector"
depends=('java-runtime')
arch=(any)
diff -ru a/vim/Makefile.am b/vim/Makefile.am
--- a/vim/Makefile.am 2015-03-11 14:20:36.865385641 +0100
+++ b/vim/Makefile.am 2015-03-11 14:21:22.580834879 +0100
@@ -1,6 +1,6 @@
PLUGIN_FILES = zeitgeist.vim
-vimplugindir = $(datadir)/vim/vim72/plugin
+vimplugindir = $(datadir)/vim/vim74/plugin
dist_vimplugin_DATA = $(PLUGIN_FILES)
@sionleroux
sionleroux / GeoBookmark.log
Created May 14, 2014 12:50
Log of GeoBookmark crash on Android version 8
05-14 14:27:39.995: D/dalvikvm(251): GC_EXPLICIT freed 916 objects / 64704 bytes in 109ms
05-14 14:28:15.884: D/AndroidRuntime(251): Shutting down VM
05-14 14:28:15.884: W/dalvikvm(251): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
05-14 14:28:15.904: E/AndroidRuntime(251): FATAL EXCEPTION: main
05-14 14:28:15.904: E/AndroidRuntime(251): java.lang.IllegalArgumentException: contentIntent required: pkg=de.onyxbits.geobookmark id=0 notification=Notification(vibrate=null,sound=null,defaults=0x0)
05-14 14:28:15.904: E/AndroidRuntime(251): at android.os.Parcel.readException(Parcel.java:1251)
05-14 14:28:15.904: E/AndroidRuntime(251): at android.os.Parcel.readException(Parcel.java:1235)
05-14 14:28:15.904: E/AndroidRuntime(251): at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:274)
05-14 14:28:15.904: E/AndroidRuntime(251): at android.app.NotificationManager.notify(NotificationManager.java:110)
05-14 14:28:15.904: E/AndroidRuntime(251):