Skip to content

Instantly share code, notes, and snippets.

View windsorschmidt's full-sized avatar
🔧
Break stuff.

Windsor Schmidt windsorschmidt

🔧
Break stuff.
  • Oakland, California
View GitHub Profile
@mattiasghodsian
mattiasghodsian / readme.md
Last active April 25, 2024 14:39
Valheim Dedicated Server Setup on Ubuntu 20.04.1 LTS

Port forwarding

Open ports (udp)

2456 2457 2458 27060

Uncomplicated Firewall

sudo ufw allow 2456/udp
@smunaut
smunaut / gtkwave-sigrok-filter.py
Last active January 18, 2024 18:37
Transaction Filter Process for GTKWave to run SigRok protocol decoders
#!/usr/bin/env python3
"""
gtkwave-sigrok-filter.py
Use as a 'Transaction Filter Process' in gtkwave to apply signal
Usage:
- Group input signals in gtkwave with F4
- Apply this script as a 'Transaction Filter Process' (Right click / Data Format)
@jackm
jackm / can-packages-and-tools.md
Last active April 23, 2024 03:39
Collection of CAN bus packages and tools

Collection of CAN bus packages and tools

This document assumes the use of Linux as the chosen development platform. Items in bold are highly recommended.

It is recommended to use SocketCAN when working with CAN bus on Linux. It is supported by the Linux kernel mainline and follows the Linux interface model, allowing you to use other network tools such as Wireshark. This also allows the creation of virtual CAN interfaces where no physical hardware is required to simulate or replay CAN messages.

@JamesHagerman
JamesHagerman / DisassembleARMBinaryInR2.md
Last active March 30, 2023 06:43
Some quick notes on disassembling 16bit ARM (STM32F4) code using radare2

Disassembling 1bitsy examples using radare2

Note that because radare2 uses Capstone to disassemble ARM code, there are issues with the disassembly. arm-none-eabi-objdump -d compiledbinary.elf actually does a better job in some cases. For example, msr isn't decompiled correctly...

First, you have to either strip the default ELF binaries the default Makefiles build when you run make OR you need to just compile .bin files using something like:

make binaryname.bin
@t3hmrman
t3hmrman / moz-reload-mode.el
Last active February 23, 2016 01:19
Reload firefox on save or modification of a file
(require 'moz)
;; This gist is just a combination of two gists that @nonsequitur thought up in 2010:
;; https://gist.github.com/nonsequitur/442376
;; https://gist.github.com/nonsequitur/666092
;; One-line change was made to support recent emacs requirement of 'provide' function (@ bottom)
;;; Usage
;; Run M-x moz-reload-mode to switch moz-reload on/off in the
;; current buffer.
@ccbrown
ccbrown / DumpHex.c
Last active March 27, 2024 17:32
Compact C Hex Dump Function w/ASCII
#include <stdio.h>
void DumpHex(const void* data, size_t size) {
char ascii[17];
size_t i, j;
ascii[16] = '\0';
for (i = 0; i < size; ++i) {
printf("%02X ", ((unsigned char*)data)[i]);
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') {
ascii[i % 16] = ((unsigned char*)data)[i];
@tylerneylon
tylerneylon / learn.lua
Last active April 28, 2024 22:23
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@willurd
willurd / web-servers.md
Last active May 9, 2024 05:48
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@endolith
endolith / readme.md
Last active April 3, 2024 18:31
THD+N calculator

Unfortunately, there are 2 versions of this. The other is here: https://github.com/endolith/waveform-analyzer I intend to either completely combine them or completely separate them, eventually.

Somewhat crude THD+N calculator in Python

Measures the total harmonic distortion plus noise (THD+N) for a given input signal, by guessing the fundamental frequency (finding the peak in the FFT), and notching it out in the frequency domain. This is a THDR