Skip to content

Instantly share code, notes, and snippets.

@dcloud
dcloud / show_time.py
Created December 17, 2018 00:21
Messing with writing some numeric chars to unicorn hat hd
#!/usr/bin/env python3
from datetime import datetime
import time
import unicornhathd as uhd
# https://xantorohara.github.io/led-matrix-editor/#
NUMBERS = (
(
@dcloud
dcloud / pi-hints.md
Last active July 19, 2019 01:01
Collecting some things I should remember when configuring Raspberry Pis

Pi Hints

Can't connect to archive.raspberrypi.org or similar?

Are you using ipv6? If so, you might need to force apt to use ipv4, e.g. sudo apt-get -o Acquire::ForceIPv4=true update. The -o Acquire::ForceIPv4=true config will force ipv4.

You can configure apt to do this without the need to add the option each time. Simply place that option in a config file: echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4. That will create a conf file to change Apt settings.

I think I used https://www.ostechnix.com/how-to-force-apt-package-manager-to-use-ipv4-in-ubuntu-16-04/ as inspiration.

@dcloud
dcloud / how_to_use_wireshark_with_nodejs.md
Last active March 14, 2024 15:40 — forked from dfrankland/how_to_use_wireshark_with_nodejs.md
How to use Wireshark with Node.js (especially with HTTPS / TLS / SSL)

How to use Wireshark with Node.js (especially with HTTPS / TLS / SSL)

It can be difficult to trace network traffic from a Node.js application. Typically, folks will just instrument some logging to check that everything is working as it is supposed to. Unfortunately, sometimes there are too many abstractions or possible race conditions to accurately get a good trace. To get the most objective possible trace of network traffic Wireshark can be used.

Wireshark is a network protocol analyzer that makes it extremely simple to capture and trace network activity from any source on your computer. It also has