Skip to content

Instantly share code, notes, and snippets.

View nospam2000's full-sized avatar

Michael Dreher nospam2000

  • Karlsruhe, Germany
View GitHub Profile
@ryandesign
ryandesign / add_oclp_ext4_driver.sh
Last active January 28, 2025 16:38
Adds ext4 driver to OpenCore Legacy Patcher so that a Linux partition can be selected.
#!/bin/bash
# SPDX-FileCopyrightText: © 2024 Ryan Carsten Schmidt <https://github.com/ryandesign>
# SPDX-License-Identifier: MIT
#
# Adds ext4 driver to OpenCore Legacy Patcher so that a Linux partition can be selected.
# Based on instructions by rikerjoe at:
# https://tinkerdifferent.com/threads/dual-boot-linux-mint-21-2-and-macos-with-opencore-legacy-patcher-and-opencore-bootpicker.3115/
set -u
@nospam2000
nospam2000 / download-my-fritz-box-logs.sh
Last active January 30, 2025 18:24 — forked from BigNerd/download-my-fritz-box-logs.sh
This bash script downloads the current Fritz Box event log as JSON file and as TXT file
#!/bin/bash
#
# This bash script downloads the current Fritz Box event log as JSON file and as TXT file.
#
# The script was tested successfully on MacOS Sonoma 14.1.1 with Fritz!Box 7590 AX V7.57
# 'jq' and 'curl' were installed via MacPorts
#
# The login procedure was implemented according to https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AVM_Technical_Note_-_Session_ID.pdf
# or https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/Session-ID_deutsch_13Nov18.pdf
@PackeTsar
PackeTsar / byobu-ssh-cheatsheet.md
Last active February 9, 2025 10:53
Byobu (over SSH) Cheat Sheet

Byobu (over SSH) Cheat Sheet

I often find myself using Byobu on a Linux machine when connected to it over SSH. In doing so, I've noticed that many of the documented keyboard shortcuts don't work. This can be due to the native PC's OS intercepting certain keys, or possibly other reasons.

Below is a cheatsheet with Byobu features I have found usually work when run over a SSH connection.

Action Windows + Putty to Ubuntu MacOS + Terminal to Ubuntu
Help menu BASH: byobu-config FN-F1
Create new window CTRL-a c CTRL-a c or FN-F2
@startergo
startergo / extract-firmware.md
Last active October 18, 2024 05:49
Extract Firmware from OS X installer
  • Download the full installer:
softwareupdate --list-full-installers
Finding available software
Software Update found the following full installers:
* Title: macOS Ventura, Version: 13.1, Size: 11931164KiB, Build: 22C65
* Title: macOS Ventura, Version: 13.0.1, Size: 11866460KiB, Build: 22A400
* Title: macOS Ventura, Version: 13.0, Size: 11866804KiB, Build: 22A380
* Title: macOS Monterey, Version: 12.6.2, Size: 12104568KiB, Build: 21G320
* Title: macOS Monterey, Version: 12.6.1, Size: 12108491KiB, Build: 21G217
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active January 29, 2025 17:01
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@lcrilly
lcrilly / README.md
Last active February 18, 2025 08:30
NGINX OAuth 2.0 Token Introspection

OAuth 2.0 Token Introspection with NGINX and njs

This configuration enables NGINX to validate an authentication token against an authorization server by using OAuth 2.0 Token Introspection (RFC 7662). This solution uses the auth_request module and the NGINX JavaScript module to require authentication and perform the token introspection request.

By default, the client's authentication token is expected as a bearer token supplied in the Authorization header. If supplied elsewhere in the HTTP request, the $access_token variable must be configured to specify where to obtain the token.

Token introspection requests are authenticated. By default, the $oauth_client_id and $oauth_client_secret variables are used to perform HTTP Basic authentication with the Authorization Server. If only the $oauth_client_secret variable is specified then that value is used

@rikka0w0
rikka0w0 / ft2232_to_digilent_jtag.md
Last active March 1, 2025 02:00
FT2232 to Digilent JTag for Xilinx FPGAs (ISE/Vivado)

The Digilent JTag uses FT2232, but its configuration EEPROM contains secrete data needed to be recoginzed by Xilinx ISE/Vivado. The following method only works on linux (tested on Ubuntu16.04), but the patched FT2232 doggle also works on Windows. Since WSL1 does not provide USB device access, the following method will not work for WSL1.

DONT use FT_Prog on offical Digilent cable, as it can trash the firmware! The offical eeprom contains secrete data that cannot be handled correctly by FT_Prog.

Here are steps to create a Digilent-like Jtag that can be used in Xilinx ISE and Vivado

  1. Install softwares: sudo apt-get install libftdi1 ftdi-eeprom
  2. Create a file "flash_digilent.conf" with the following content:
@radiomanV
radiomanV / Bit Banging
Last active May 31, 2021 02:59
TL866 Bit Banging
Start logic protocol
03 00 07 00 00 00 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
set pin direction 24pins(0-out 1-in)
50 00 07 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40
toggle 24pins (0/1) first 7 bytes=header
52 00 07 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40
apply power supply
@ulidtko
ulidtko / qnap-qts-fw-cryptor.py
Last active February 1, 2025 13:53
QNAP QTS firmware encryptor/decryptor.
#!/usr/bin/env python3
import os, sys
import argparse
import struct
from functools import reduce
"""
QNAP QTS firmware encryptor/decryptor.
Based on https://pastebin.com/KHbX85nG
@FilipDominec
FilipDominec / owon_wave.py
Last active May 31, 2024 13:22 — forked from aniline/owon_wave.py
Make a wave file from owon oscilloscope wave dump. It just does one channel. Not tested with numerous other combinations. Note that slow "running-wave" records fail to be properly saved due to Owon firmware bug.
#!/usr/bin/env python
#
# Makes a wav file out of owon oscilloscope waveform save file.
# Tested with SDS6062 only.
#
# Used:
# http://bikealive.nl/owon-bin-file-format.html and
# http://bikealive.nl/tl_files/EmbeddedSystems/Test_Measurement/owon/OWON%20Oscilloscope%20PC%20Guidance%20Manual.pdf
#