Skip to content

Instantly share code, notes, and snippets.

@yoursunny
yoursunny / MagTag_Christmas.ino
Created December 23, 2024 01:50
Christmas lights made from Adafruit MagTag https://youtu.be/mjqgy_R7W7M
// Hardware: Adafruit MagTag https://learn.adafruit.com/adafruit-magtag
// Compiler and Libraries:
// - Arduino IDE 2.3.4
// - ESP32 Arduino Core 3.0.7
// - Adafruit NeoPixel 1.12.3
// - Adafruit EPD 4.5.6
// Settings:
// - CPU Frequency: 40MHz
#include <Adafruit_NeoPixel.h>
@yoursunny
yoursunny / 1.xlsx
Last active April 16, 2024 20:53
NDN global testbed topology design 20240330
@yoursunny
yoursunny / .gitignore
Last active March 19, 2022 05:34
NDN Video Streaming on the ndn6 Network https://yoursunny.com/t/2021/NDN-video-ndn6/
*.mmdb
*.ndjson
.vscode
__pycache__
@yoursunny
yoursunny / .gitignore
Last active September 10, 2021 14:39
"freewifi" via ESP8266 Captive Portal https://yoursunny.com/t/2017/freewifi/
/.vscode
/data
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <limits.h>
#include <sys/stat.h>
#include <unistd.h>
FROM golang:1.16 AS build
WORKDIR /app
COPY . .
RUN env CGO_ENABLED=0 go build -o summer-host-storage main.go
FROM scratch
COPY --from=build /app/summer-host-storage /summer-host-storage
ENTRYPOINT ["/summer-host-storage"]
CMD ["-listen=:8000"]
*.mmdb
*.ndjson
.vscode
__pycache__
@yoursunny
yoursunny / .gitignore
Last active February 4, 2021 03:10
The Reality of NDN Video Streaming https://yoursunny.com/t/2021/NDN-video-reality/
*.mmdb
*.ndjson
.vscode
__pycache__
@yoursunny
yoursunny / ca-profile.data.base64
Last active November 22, 2025 17:24
yoursunny.com NDNts-CA profile
Bv0CUgc0CANuZG4IA2VkdQgHbWVtcGhpcwgIMjAyNTExMjIIAkNBCARJTkZPNggAAAGarJb/ZDIB
ABQLGQQANu6AGgMyAQAV/QF5gR8HHQgDbmRuCANlZHUIB21lbXBoaXMICDIwMjUxMTIygwCLBAB2
pwCJ/QFMBv0BSAc/CANuZG4IA2VkdQgHbWVtcGhpcwgIMjAyNTExMjIIA0tFWTgIAAZEMhIJstgI
B05ETkNFUlQ2CAAAAZqslmUaFAkYAQIZBAA27oAVWzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA
BE3W5uLvtA7WQ8fS/5hsysJ4NIztwaKZx6K81+7zA5iCm229ysOn5KqdiiRqremWDLQED9fUxgQ/
5d6crpljc3IWVBsBAxwlByMIA25kbggDS0VZCAgnxLIqn3uBJwgDbmRuNggAAAGAdfpztP0A/Sb9
AP4PMjAyNTExMjJUMTcyMTQx/QD/DzIwMjYwMjIwVDE3MjE0MRdHMEUCIHnDmnBJ4JZcfsqEX3XC
B+eO5gH1TG7imFT7aNeAZkgtAiEAtK+hnvyvCJs4HobuiaeX9Ng92bKSucmbTv3fNCX+QAQWRhsB
AxxBBz8IA25kbggDZWR1CAdtZW1waGlzCAgyMDI1MTEyMggDS0VZOAgABkQyEgmy2AgHTkROQ0VS
VDYIAAABmqyWZRoXSDBGAiEA0Qa5+UwaM/S26BBskfV4k+dgfRt9In5cdOe/uECD4rQCIQCKP2yS
b = 0
m_bits = 5
m_max = (1<<m_bits)
for i in range(0,256):
e = i >> m_bits
m = i & ((1<<m_bits) - 1)
if e == 0:
x = (0 + m / m_max) * pow(2, 1 + b)