Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢

Neale Pickett nealey

🐢
View GitHub Profile
@nealey
nealey / rcirc-cloud-to-butt.el
Created November 19, 2015 17:52
Cloud To Butt for rcirc
View rcirc-cloud-to-butt.el
(defun neale/rcirc-butt-markup (sender response)
(while (re-search-forward "the cloud" nil t)
(replace-match "my butt"))
(goto-char (point-min))
(while (re-search-forward "cloud" nil t)
(replace-match "butt"))
(goto-char (point-min))
(while (re-search-forward "cyber" nil t)
(replace-match "spider")))
(add-hook 'rcirc-markup-text-functions 'neale/rcirc-butt-markup)
View raspbian-setup-email.sh
#!/bin/sh
sudo apt-get update
sudo debconf-set-selections <<EOF
postfix postfix/root_address string pi
postfix postfix/main_mailer_type select Internet Site
postfix postfix/mailname string raspberry.pi
postfix postfix/mynetworks string
postfix postfix/recipient_delim string
postfix postfix/protocols select all
View bubblebabble.py
#!/usr/bin/python3
"""
Python implementation of "The Bubble Babble Binary Data Encoding" (draft-huima-01)
Please note that this is not a cryptographic hash,
it can be reversed.
"""
class BubbleBabble:
@nealey
nealey / bad-clock.py
Created August 16, 2016 04:31
Broken clock, like in Meow Wolf's House of Eternal Return. For Raspberry Pi and Sparkfun's Serial 7-Segment Display
View bad-clock.py
#! /usr/bin/python
import smbus
import time
import random
bus = smbus.SMBus(1)
address = 0x71
chars = " \"'(),-01234567890ABCDEFGHIJLNOPQRSTUY_`cehiou"
@nealey
nealey / ssh.el
Last active September 30, 2016 20:32
View ssh.el
;;
;; ssh
;;
(require 'comint)
(require 'shell)
(defgroup ssh nil
"Secure shell interface"
:group 'processes
:group 'unix)
View npirc.el
;;; 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.
View stunnel.conf
foreground=yes
debug=7
pid=
[slashnet]
client = yes
accept = 38697
connect = us.slashnet.org:6697
@nealey
nealey / 2track.html
Created July 11, 2017 03:37
Basic 2-track DJ software in pure HTML5 JavaScript
View 2track.html
<!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.
@nealey
nealey / dockerfile
Created August 4, 2017 18:42
Complete system for Cyber Fire net-re class
View dockerfile
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 / await-change.sh
Created September 21, 2017 17:19
Shell function to block until files are written
View await-change.sh
# 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