Skip to content

Instantly share code, notes, and snippets.

@gdm85
gdm85 / rsyslog.lua
Created June 16, 2015 19:30
example plugin by cristi1979 to handle /dev/log
local math = require "math"
local dt = require "date_time"
local l = require "lpeg"
l.locale(l)
local hostname = read_config("hostname")
local trim = read_config("trim") or true
local overwrite_timestamp = read_config("overwrite_timestamp") or false
local overwrite_hostname = read_config("overwrite_hostname") or false
@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!