Skip to content

Instantly share code, notes, and snippets.

ppelleti / TestSpookyV2.cpp
Created Apr 23, 2022
version of Bob Jenkins' TestSpookyV2.cpp which works on UNIX as well as Windows
View TestSpookyV2.cpp
#include "SpookyV2.h"
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <windows.h>
ppelleti / feather.txt
Created Aug 31, 2018
Feather pinout ASCII art
View feather.txt
This is an unofficial pinout diagram of the Adafruit Feather
For more information about this diagram, see:
ppelleti /
Created Jul 24, 2017
script to generate KiCad footprint for Panasonic JW2 relay
#!/usr/bin/env python3
import sys
from KicadModTree import *
footprint_name = "Relay_DPDT_Panasonic_JW2"
f = Footprint(footprint_name)
ppelleti / alitove_with_button.ino
Last active Dec 24, 2016
Arduino sketch for displaying several different patterns of lights on WS2811/WS2812 LEDs, controlled by a pushbutton.
View alitove_with_button.ino
/* This Arduino sketch is for controlling a string of Alitove lights
* from an Adafruit Trinket. The lights are connected to the
* Trinket's pin 1 through a resistor. A pushbutton is connected from
* pin 0 to ground. You can use the pushbutton to cycle through the
* following modes:
* 1. Solid purple
* 2. Blue with white twinkles
* 3. Rainbow
* 4. Multicolored blinking
ppelleti /
Created May 4, 2016
Convert SVG files to DXF files on Mac OS X
#!/usr/bin/perl -w
# - convert SVG files to DXF files on Mac OS X
# by Patrick Pelletier, public domain (or cc0)
# based on the commands suggested here:
# assumes is installed in /Applications
# and pstoedit is installed in PATH, such as via "brew install pstoedit"
use Cwd qw(abs_path);
ppelleti / Setup.hs
Last active Aug 12, 2016
copy photos from my phone using Android Debug Bridge
View Setup.hs
import Distribution.Simple
main = defaultMain
ppelleti / table.json
Created Sep 19, 2015
LIFX product table in an easy-to-consume format
View table.json
"Color": "Yes",
"Name": "Original 1000",
"Product ID": "1",
"Vendor ID": "1"
"Color": "Yes",
"Name": "Color 650",
ppelleti / simultaneous-ping-gc.txt
Created Aug 31, 2015
using RTS option "-S" to see if Haskell gc is causing hiccups
View simultaneous-ping-gc.txt
WhiteAndNerdy% ping & ; dist/build/lifx/lifx ping -i 0225cd +RTS -S
[1] 39977
PING ( 56 data bytes
Alloc Copied Live GC GC TOT TOT Page Flts
bytes bytes bytes user elap user elap
64 bytes from icmp_seq=0 ttl=128 time=34.718 ms
64 bytes from icmp_seq=1 ttl=128 time=22.805 ms
64 bytes from icmp_seq=2 ttl=128 time=13.410 ms
64 bytes from icmp_seq=3 ttl=128 time=47.288 ms
64 bytes from icmp_seq=4 ttl=128 time=15.934 ms
ppelleti / simultaneous-ping.txt
Created Aug 31, 2015
ICMP ping and EchoRequest together on my Original 1000 LIFX bulb with 2.1 firmware
View simultaneous-ping.txt
WhiteAndNerdy% ping & ; cabal run -- ping -i 0225cd
[1] 39944
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=128 time=51.869 ms
Preprocessing executable 'lifx' for lifx-
64 bytes from icmp_seq=1 ttl=128 time=85.007 ms
Running lifx...
64 bytes from icmp_seq=2 ttl=128 time=14.840 ms
64 bytes from icmp_seq=3 ttl=128 time=19.594 ms
64 bytes from icmp_seq=4 ttl=128 time=9.691 ms
ppelleti / berp-test-failures.txt
Created May 13, 2015
test suite failures for my ghc783 branch of berp
View berp-test-failures.txt
:../test/regression/features/arithmetic/mult.test: [OK]
:../test/regression/features/arithmetic/mult_float_precision.test: [OK]
:../test/regression/features/arithmetic/plus.test: [OK]
:../test/regression/features/arithmetic/type_conversion.test: [OK]
:../test/regression/features/assignment/assign_multi.test: [OK]
:../test/regression/features/assignment/assign_subscript.test: [OK]
:../test/regression/features/assignment/assign_unpack.test: [Failed]
Expected stdout: