Skip to content

Instantly share code, notes, and snippets.

View up-n-atom's full-sized avatar

up-n-atom

View GitHub Profile
@ctsrc
ctsrc / 00_install_fbsd_14_1_hetzner.md
Last active December 25, 2025 23:54
Install FreeBSD 14.1 on Hetzner

Install FreeBSD 14.1 on Hetzner server

Hetzner no longer offers direct install of FreeBSD, but we can do it ourselves. Here is how :)

Boot the server into rescue mode

Boot the Hetzner server in Hetzner Debian based rescue mode. ssh into it.

The Hetzner rescue image will tell you hardware details about the server in the login banner. For example, with one of my servers I see:

@todbot
todbot / sw_targeting_computer_code.py
Last active June 19, 2023 03:39
Animated Star Wars targeting computer for CircuitPython
# sw_targeting_computer_code.py -- animated targeting computer for CircuitPython
# 4 May 2022 - @todbot / Tod Kurt
# # Uses one background image and two tilegrid animations
import time
import board
import displayio
display = board.DISPLAY
maingroup = displayio.Group()
@luzhuomi
luzhuomi / pocketchip_debian10.md
Last active August 24, 2025 23:31
A tutorial to upgrade NXT pocket C.H.I.P to Debian Buster

Pocket Chip Debian 10 Upgrade Guide

The purpose of this tutorial is to walk through the required steps to upgrade NXT chip (or pocketchip) from debian jessie to debian buster.

If you would like to start your Chip from scratch, follow the steps in the Preparation section.

Preparation (Optional)

A linux host machine, recommended Ubuntu 18.04. However I managed to do it with 20.10 with some tweak.

@Anime4000
Anime4000 / advanced_conf-telnet.md
Last active September 14, 2024 08:01
XPON SFP ONU (V2801F), XPON STICK ONU (TWCGPON657), RTL8672, RTL9601C1
@MarsTechHAN
MarsTechHAN / bin2c.py
Last active April 1, 2025 12:04
Program Gowin from ESP32
import struct
import sys
if __name__ == '__main__':
fs = open(sys.argv[1], 'rb')
with open('fs.c', 'w+') as f:
print('const unsigned char fs_bitstream[] __attribute__((aligned(128))) ={', file=f)
counter = 0
while 1:
counter = counter + 1
@ciniml
ciniml / gowin.py
Last active October 21, 2024 16:21
GOWIN SSPI configuration script for M5Stack
import os
import machine
import time
class GowinConfig(object):
def __init__(self, pin_cs:machine.Pin, pin_mode0:machine.Pin, pin_reconfig_n:machine.Pin, pin_ready:machine.Pin, spi:machine.SPI):
self.__pin_cs = pin_cs
self.__pin_mode0 = pin_mode0
self.__pin_reconfig_n = pin_reconfig_n
self.__pin_ready = pin_ready
@korken89
korken89 / length_match.py
Created July 9, 2019 21:07
KiCAD bus length matching script which also adds in the "Pad to die length" into the calculations
#!/usr/bin/env python3
import sys
import os
import re
import time
import pcbnew
"""
This is a modified version of https://github.com/mithro/kicad-length-matching-checks.git
which also adds in the "Pad to die length" into the calculations (plus different formating).
@colematt
colematt / .Adding-Sections-to-Elf-Binaries.md
Last active June 20, 2025 07:26
[Add a section to an ELF binary] #llvm

Adding Sections to ELF Binaries

Suppose you need to add a section to an ELF binary to contain information gathered at compile time, but to be used at link time or run time. Here's how to add a section named .okdata and either populate it with data either after or before emitting the ELF binary.

Adding a Section After Emitting

In this case, you'll add file’s contents to an already existing binary. objcopy copies and translates object files, such that adding a new section is a matter of writing that new section’s contents into the ELF file.

(Optional) Create a simple program’s object file.

@geekman
geekman / uboot-image.bt
Created December 8, 2018 09:11
010 editor template for U-Boot images that i hacked up
//
// quick 010 Editor template for u-boot images
// darell tan 2018.12.08
//
enum <uchar> IH_TYPES {
TYPE_INVALID,
TYPE_STANDALONE,
TYPE_KERNEL,
TYPE_RAMDISK,
@uXeBoy
uXeBoy / minimalDVID_encoder.v
Last active October 9, 2022 03:18
minimalDVID_encoder.v
`default_nettype none // disable implicit definitions by Verilog
//-----------------------------------------------------------------
// minimalDVID_encoder.vhd : A quick and dirty DVI-D implementation
//
// Author: Mike Field <hamster@snap.net.nz>
//
// DVI-D uses TMDS as the 'on the wire' protocol, where each 8-bit
// value is mapped to one or two 10-bit symbols, depending on how
// many 1s or 0s have been sent. This makes it a DC balanced protocol,
// as a correctly implemented stream will have (almost) an equal