Skip to content

Instantly share code, notes, and snippets.

View nealey's full-sized avatar
🐢

Neale Pickett nealey

🐢
View GitHub Profile
@nealey
nealey / rproxy-docker-containers.conf
Last active November 9, 2017 20:35
nginx configuration to reverse proxy to any docker image it can resolve
server {
listen 443 default_server ssl http2;
// server_name if you need it
// don't forget your SSL configuration
location ~ ^/([^/]+)/ {
resolver 127.0.0.11;
proxy_pass http://$1/;
}
<!DOCTYPE html>
<html>
<head>
<title>Starship Engine Noise</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
function whiteNoise(audioCtx) {
var bufferSize = 17 * audioCtx.sampleRate,
noiseBuffer = audioCtx.createBuffer(1, bufferSize, audioCtx.sampleRate),
output = noiseBuffer.getChannelData(0);
@nealey
nealey / webmidi-explore.html
Created March 18, 2018 16:46
WebMIDI explorer: prints all MIDI messages, and lets you craft messages to send
<!DOCTYPE html>
<html>
<head>
<title>Web MIDI explorer</title>
<style>
.message span {
padding: 0.5em;
}
.message .type {
font-weight: bold;
@nealey
nealey / Dockerfile
Created April 19, 2018 14:05
Build Rocket r750 driver
FROM bugroger/coreos-developer:${COREOS_VERSION} as BUILD
ENV R750_VERSION=v1.2.10.1-17_01_23
RUN emerge-gitclone
RUN . /usr/share/coreos/release && \
git -C /var/lib/portage/coreos-overlay checkout build-${COREOS_RELEASE_VERSION%%.*}
RUN emerge -gKv coreos-sources > /dev/null
RUN cp /usr/lib64/modules/*/build/.config /usr/src/linux/
RUN make -C /usr/src/linux modules_prepare
@nealey
nealey / dvdrip.sh
Created April 20, 2019 19:27
Rip (transcode) DVD chapters into individual mp4 files
#! /bin/sh
# If you have more than 50 chapters, you'll need to bump this value up.
# It doesn't hurt anything to have the number too high, though.
for i in $(seq -w 1 50); do
echo "== Chapter $i"
HandBrakeCLI \
--input /mnt/chromeos/removable/No\ Label/ \
--crop 0,0,0,0 \
--chapters $i \
/* e-paper display lib */
#include <GxEPD.h>
//Use the GxGDEW029T5 class if you have Badgy Rev 2C. Make sure you are on GxEPD 3.05 or above
#include <GxGDEW029T5/GxGDEW029T5.h>
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>
#include <Fonts/FreeSansBold9pt7b.h>
#include <Fonts/FreeSansBold12pt7b.h>
#include <Fonts/FreeSansBold24pt7b.h>
@nealey
nealey / README.md
Last active November 3, 2019 22:03
feisworx.com mobile-friendlier (tampermonkey user script)

Feisworx Mobile Mode

This fiddles around with FeisWorx pages to make them a little more usable on mobile devices like phones and tablets.

Danger Will Robinson

Loading things like TamperMonkey allows scripts to mess with your web pages. This is almost always a bad idea. If you aren't a developer who can read JavaScript, or know one who can look this over to make sure I'm not doing something awful, you should steer clear of this and all other user scripts.

How To Install

/* Solarized */
#define SOL_BASE03 0x002b36ff
#define SOL_BASE02 0x073642ff
#define SOL_BASE01 0x586e75ff
#define SOL_BASE00 0x657b83ff
#define SOL_BASE0 0x839496ff
#define SOL_BASE1 0x93a1a1ff
#define SOL_BASE2 0xeee8d5ff
#define SOL_BASE3 0xfdf6e3ff
#define SOL_YELLOW 0xb58900ff
@nealey
nealey / GoldenClicker.js
Last active October 1, 2021 21:55
A Cookie Clicker mod to automatically click the golden cookie
let Millisecond = 1
let Second = 1000 * Millisecond
let Minute = 60 * Second
let Hour = 60 * Minute
class GoldenClicker {
heartbeat() {
for (let s of Game.shimmers) {
if (s.type == "golden") {
s.pop()
@nealey
nealey / djb2hash.awk
Last active May 29, 2022 12:33
djb / dbj2 hash in awk
function ord(c) {
for (i = 0; i < 256; i += 1) {
if (sprintf("%c", i) == c) {
return i
}
}
return 256
}
function hash(str) {