Skip to content

Instantly share code, notes, and snippets.

jeamland / tarpaulin-output.txt
Created May 13, 2020
Tarpaulin output from tide-rs
View tarpaulin-output.txt
> cargo tarpaulin -v
[INFO tarpaulin] Creating config
[INFO tarpaulin] Running Tarpaulin
[INFO tarpaulin] Building project
Compiling libc v0.2.70
Compiling proc-macro2 v1.0.12
Compiling unicode-xid v0.2.0
Compiling autocfg v1.0.0
Compiling cfg-if v0.1.10
Compiling syn v1.0.20
jeamland /
Created Dec 2, 2019
Attempt at a fake device in Python
#!/usr/bin/env python
import os
import select
import subprocess
import time
import traceback
import functionfs
import functionfs.ch9
jeamland / fishbash.txt
Last active Oct 17, 2018
fish vs bash
View fishbash.txt
# Necessary establishing information...
fish$ fish --version
fish, version 2.7.1
# Let's create a file that contains newlines.
fish$ cat > testfile.txt
jeamland /
Last active Sep 3, 2020
iTunes Library (non-XML) playlist extractor
#!/usr/bin/env python
# Extract playlists from a non-XML iTunes Library file (.itl)
# Copyright (c) 2018 Benno Rice, released under the BSD (2 Clause) Licence.
# Important information on the encryption used in the .itl file found here:
# Highly useful information on the .itl format itself found here:
jeamland / thing.c
Created Aug 7, 2018
Benno's Misadventures in libusb
View thing.c
$ uname -a
Darwin benno-mac.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64$ cc -o thing -I/usr/local/include/libusb-1.0 -L/usr/local/lib thing.c -lusb-1.0
$ ./thing
thing: set config failed: No such device (it may have been disconnected): No such file or directory
thing: claim interface failed: Access denied (insufficient permissions)
import curses
import paho.mqtt.client as mqtt
MQTT_TOPIC = 'lolibot/esp32_4e8854/in'
client = mqtt.Client()
client.connect(MQTT_SERVER, 1883, 60)
client.publish(MQTT_TOPIC, '(led:write 255 0 0)')
View gist:269101f77d76c1e1d13acafebcfe4072
Python 3.6.4 (default, Dec 19 2017, 15:26:29)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import parse
>>> parse.parse('r{:d}', 'r4')
<Result (4,) {}>
>>> parse.parse('r{:d}', 'r 4')
<Result (4,) {}>
>>> parse.parse('r{:0d}', 'r 4')
<Result (4,) {}>
jeamland / failtest.c
Created Aug 3, 2017
Example of jemalloc test failure code
View failtest.c
#include <errno.h>
#include <stdio.h>
#include "jemalloc/jemalloc.h"
main(int argc, char **argv)
int *thing, frob, res;
size_t frobsize;
View debug-run.txt
> invoke --debug build_image --clean build --clean
invoke.program._parse: No default namespace provided, trying to load one from disk
invoke.loader.find: FilesystemLoader find starting at '/src/kth'
invoke.loader.find: Found module: '/src/kth/'
invoke.parser.__init__: Adding <parser/Context 'build_image': {'clean': <Argument: clean (c) [bool]>}>
invoke.parser.__init__: Adding <parser/Context 'build': {'clean': <Argument: clean (c) [bool]>}>
invoke.program.parse_tasks: Parsing tasks against <Collection 'tasks': build, build_image>
invoke.parser.__init__: Initialized with context: <parser/Context: {'complete': <Argument: complete [bool]>, 'debug': <Argument: debug (d) [bool]>, 'write-pyc': <Argument: write-pyc [bool]>, 'echo': <Argument: echo (e) [bool]>, 'config': <Argument: config (f)>, 'help': <Argument: help (h) ?>, 'hide': <Argument: hide>, 'list': <Argument: list (l) [bool]>, 'pty': <Argument: pty (p) [bool]>, 'version': <Argument: version (V) [bool]>, 'warn-only': <Argument: warn-only (w) [bool]>
jeamland / bot_ips.csv
Last active Feb 28, 2017
Addresses of the bot herd that's been lurking on my IRC channel
View bot_ips.csv
timestamp hostname ip
You can’t perform that action at this time.