Skip to content

Instantly share code, notes, and snippets.

@gdm85
gdm85 / jsbin.banekiq.js
Created August 17, 2020 11:26 — forked from crates/jsbin.banekiq.js
Entombed maze generator // source: https://jsbin.com/banekiq
// Entombed maze generator
// More info at https://www.semanticscholar.org/paper/Entombed%3A-An-archaeological-examination-of-an-Atari-Aycock-Copplestone/fc18c3f88be41e4102654c1d883b907d7bfae6d2
// Written by reddit.com/user/JaggedMetalOs
// Here's what I'd like to see added: (Crates)
// * There must be at least one valid path from start to exit
// * Areas that are completely enclosed should have no openings inside
// * Avoid shorter paths that go less far, in favor of longer, meandering ones
// * It would be cool to see an AI that can generate complex mazes!
label expert
menu label ^Expert install
kernel linux
append priority=low vga=0x340 initrd=initrd.gz ---
label cli-expert
menu label Command-^line expert install
kernel linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=0x340 initrd=initrd.gz ---
include rqtxt.cfg
@gdm85
gdm85 / iftopsvc.log
Last active February 10, 2018 13:08
Example of log output of iftop -S 8080
interface: eth0
IP address is: 192.168.1.10
MAC address is: c7:35:ce:fd:8e:a1
[Fri Feb 2 22:03:10 2018] REST webservice starting on port 8080
[Fri Feb 2 22:03:10 2018] "GET /iftop/history" 200 35
[Fri Feb 2 22:03:12 2018] "GET /iftop/history" 200 145
[Fri Feb 2 22:03:15 2018] "GET /iftop/history" 200 145
[Fri Feb 2 22:03:17 2018] "GET /iftop/history" 200 145
[Fri Feb 2 22:03:19 2018] "GET /iftop/history" 200 145
[Fri Feb 2 22:03:21 2018] "GET /iftop/history" 200 145
@gdm85
gdm85 / iftopsvc.json
Last active February 10, 2018 13:01
Example output of /iftop/history
{
"version": "1.0pre4",
"history": [{
"source": "192.168.1.10:55340",
"destination": "172.207.13.3:443",
"received": 4758,
"sent": 1118,
"protocol": 6
},
{
@gdm85
gdm85 / socat-add-verify-hash.patch
Created December 25, 2017 17:08
Socat patch to add hash verification to openSSL connections
commit 49d13df85993eda521002b9c197d68914c0c86e6
Author: gdm85 <[email protected]>
Date: Tue Nov 14 23:21:23 2017 +0100
[PATCH] Add support for openssl-verify-hash
A new option is added, openssl-verify-hash with alias verify-hash; this option
specifies a SHA256 hash in hexadecimal format that will be required to match
the X509 hash of the OpenSSL peer certificate.
Documentation is updated to mention MiTM for the pre-existing 'verify' option
@gdm85
gdm85 / round.go
Created November 22, 2017 13:31
Round function for Go < 1.10
package main
import (
"math"
)
// some constants copied from https://github.com/golang/go/blob/master/src/math/bits.go
const (
shift = 64 - 11 - 1
bias = 1023
@gdm85
gdm85 / init.coffee
Last active November 13, 2016 07:44
D-Lang IDE with Atom: init.coffee
## main article: https://medium.com/@gdm85/atom-editor-building-with-f5-edc228034ec0
atom.commands.add 'atom-text-editor', 'dlang:save-run', ->
editor = atom.workspace.getActiveTextEditor()
editor.save()
atom.commands.dispatch(atom.views.getView(editor), 'atom-shell-commands:dfmt-run')
atom.commands.add 'atom-text-editor', 'dlang:save-build', ->
editor = atom.workspace.getActiveTextEditor()
editor.save()
atom.commands.dispatch(atom.views.getView(editor), 'atom-shell-commands:dfmt-build')
@gdm85
gdm85 / keymap.cson
Last active November 13, 2016 07:44
D-Lang IDE with Atom: keymap.cson
## main article: https://medium.com/@gdm85/atom-editor-building-with-f5-edc228034ec0
'atom-workspace':
'f5' : 'atom-shell-commands:run-project'
'f6' : 'atom-shell-commands:make-project'
'atom-text-editor':
'f5' : 'dlang:save-run'
'f6' : 'dlang:save-build'
@gdm85
gdm85 / config.cson
Last active November 13, 2016 07:43
D-Lang IDE with Atom: config.cson
## main article: https://medium.com/@gdm85/atom-editor-building-with-f5-edc228034ec0
"*":
"atom-shell-commands":
commands: [
{
name: "make-project"
command: "make"
options:
cwd: "{ProjectDir}"
matchs: [
@gdm85
gdm85 / wolfengo.log
Created February 12, 2016 06:16
Texture coordinates debug output (Linux/working)
WolfenGo v0.1.1, Copyright (C) 2016 gdm85
https://github.com/gdm85/wolfengo
WolfenGo comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under GNU/GPLv2 license.
3.0 Mesa 10.1.3
addVertices( [-0.14736843 0 0 -1 1 0 0 0 -0.14736843 0.25 0 -1 -0 0 0 0 0.14736843 0.25 0 -0 -0 0 0 0 0.14736843 0 0 -0 1 0 0 0] , [0 1 2 0 2 3] )
addVertices( [-0.18125 0 0 -1 1 0 0 0 -0.18125 0.7 0 -1 -0 0 0 0 0.18125 0.7 0 -0 -0 0 0 0 0.18125 0 0 -0 1 0 0 0] , [0 1 2 0 2 3] )
addVertices( [0 0 0 0.5 1 0 0 0 0 1 0 0.5 0.75 0 0 0 1 1 0 0.75 0.75 0 0 0 1 0 0 0.75 1 0 0 0 0 0 0 0.73 1 0 0 0 0 1 0 0.73 0.75 0 0 0 0 1 0.125 0.75 0.75 0 0 0 0 0 0.125 0.75 1 0 0 0 0 0 0.125 0.5 1 0 0 0 0 1 0.125 0.5 0.75 0 0 0 1 1 0.125 0.75 0.75 0 0 0 1 0 0.125 0.75 1 0 0 0 1 0 0 0.73 1 0 0 0 1 1 0 0.73 0.75 0 0 0 1 1 0.125 0.75 0.75 0 0 0 1 0 0.125 0.75 1 0 0 0] , [0 1 2 0 2 3 6 5 4 7 6 4 10 9 8 11 10 8 12 13 14 12 14 15] )
addVertices( [-0.030106707 0 0 -1 1 0 0 0 -0.030106707 0.0625 0 -1 -0 0 0 0 0.030106707