Skip to content

Instantly share code, notes, and snippets.

View pikesley's full-sized avatar
💭
I fly cargo planes full of rubber dogshit out of Hong Kong

pikesley pikesley

💭
I fly cargo planes full of rubber dogshit out of Hong Kong
View GitHub Profile
@pikesley
pikesley / main.py
Created August 1, 2025 12:48
Bluetooth controller
import asyncio
import bluetooth
import machine
import aioble
bluetooth_uuids = {
"mode": "1f99225b-be9e-4b8a-86dd-6c92033453d8",
"service": "3a48f6c5-22e4-4719-82dc-0abd1af1fd84",
}
@pikesley
pikesley / Dockerfile
Created December 21, 2023 19:19
Approximating Pi by throwing darts
FROM python:3.12
ARG PROJECT
COPY ./ /opt/${PROJECT}
WORKDIR /opt/${PROJECT}
@pikesley
pikesley / .env
Created December 23, 2022 18:05
Github Vandalism docker-compose
CLIVE_PORT=6060
COCKROACH_PORT=7070
POKROVSKY_PORT=8080
@pikesley
pikesley / README.md
Last active December 20, 2022 22:45
Local Mastodon with `docker-compose`

!!! THIS NO LONGER WORKS, FUCK'S SAKE MASTODON !!!

Clone, patch, build containers

git clone https://github.com/mastodon/mastodon
cd mastodon
{ curl https://gist.githubusercontent.com/pikesley/f573e283d7c3724f7cb202e73e0f49ee/raw/4d25875d725ecc280ff671a3e5317308568d8d1c/hack.patch ; echo ; } | git apply -v --index # apply my patch
touch .env.production
docker compose build
@pikesley
pikesley / long-tests.js
Last active May 1, 2021 20:26
Nightwatch is confusing
const url = 'http://foo:8000'
module.exports = {
"The spans have the correct class": function (browser) {
let spans = ['#foo', '#bar', '#a', '#really', '#long', '#list']
spans.forEach(function (span) {
browser
.url(url)
@pikesley
pikesley / foo.md
Last active August 19, 2020 09:02

This a heading

This also should be a heading

And this

But not this

How to set up a MicroSD card with the NOOBS installer (on a Mac)

Formatting 64GB and larger MicroSD cards with the SD Card Formatter thing no worky, it needs to be FAT32. And I've forgotten that more than once, so I'm writing it down here

This all presumes that you're happy to blat whatever's already on the card

  • Create a new directory
  • Create a Makefile in the directory with the content below
  • Copy the latest NOOBS into the directory
  • make download if you don't already have it
@pikesley
pikesley / bumpme
Last active February 28, 2019 11:16
Thu Feb 28 11:16:48 UTC 2019
@pikesley
pikesley / trap.sh
Last active January 29, 2019 17:26
The Admiral
mkdir -p /tmp/trap && pushd /tmp/trap && echo -e "FROM alpine\nRUN apk add ack\nCMD clear && echo && ack --bar && echo" > Dockerfile && docker build -t ackbar . && rm Dockerfile && docker run ackbar && popd > /dev/null
@pikesley
pikesley / equestreum-chain.json
Last active September 4, 2018 20:43
The Horses -v- Ducks vote blockchain, made with https://github.com/hat-festival/equestreum
{
"chain_length": 49,
"blocks": [
{
"data": "duck",
"time": 1535910914,
"hash": "0000556b89b5fcf5759862ec7d3c9f5a74979d9c87b378f12889330e500d0868",
"prev": "00009cb06f74e26cd1feea75624d7e967f1f73d763691c6eab268fb068b9e14c",
"nonce": 188474,
"difficulty": 4