Skip to content

Instantly share code, notes, and snippets.

View nealey's full-sized avatar
🐢

Neale Pickett nealey

🐢
View GitHub Profile
@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 / 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;
<!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 / 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/;
}
@nealey
nealey / await-change.sh
Created September 21, 2017 17:19
Shell function to block until files are written
# while await-change *.c; do make && ./run; done
await_change () {
ts=/tmp/await-change.$$
: >$ts
while sleep 0.3; do
for fn in "$@"; do
if [ $fn -nt $ts ]; then
rm -f $ts
return
@nealey
nealey / dockerfile
Created August 4, 2017 18:42
Complete system for Cyber Fire net-re class
FROM alpine
RUN apk --no-cache add tmux sudo vim less
RUN echo 'ALL ALL=NOPASSWD: ALL' | tee /etc/sudoers.d/house-is-a-rockin
WORKDIR /usr/local/src
RUN apk --no-cache add build-base git
RUN git clone https://github.com/dirtbags/fluffy
RUN make -C fluffy install DESTDIR=/usr/local
@nealey
nealey / 2track.html
Created July 11, 2017 03:37
Basic 2-track DJ software in pure HTML5 JavaScript
<!DOCTYPE html>
<!-- Crummy DJ software in pure JavaScript -->
<!-- I wrote in on Chrome using Mozilla documentation, so in theory it'll work on either. -->
<!-- 2017 Neale Pickett -->
<!-- Placed in the Public Domain -->
<html>
<head>
<script>
function loadFile(deck, e) {
// Having the user select the file is how you get local files without upsetting CORS.
foreground=yes
debug=7
pid=
[slashnet]
client = yes
accept = 38697
connect = us.slashnet.org:6697
;;; rcirc.el --- default, simple IRC client.
;; Copyright (C) 2005-2014 Free Software Foundation, Inc.
;; Author: Ryan Yeske <rcyeske@gmail.com>
;; Maintainers: Ryan Yeske <rcyeske@gmail.com>,
;; Deniz Dogan <deniz@dogan.se>
;; Keywords: comm
;; This file is part of GNU Emacs.
@nealey
nealey / ssh.el
Last active September 30, 2016 20:32
;;
;; ssh
;;
(require 'comint)
(require 'shell)
(defgroup ssh nil
"Secure shell interface"
:group 'processes
:group 'unix)