Skip to content

Instantly share code, notes, and snippets.

@JonasGroeger
JonasGroeger / git-libsecret.md
Last active April 29, 2024 05:50 — forked from maelvls/README.md
Guide: How to install git-credential-helper / libsecret in Debian / Ubuntu

Storing your GIT credentials in libsecret

# Install dependencies
$ sudo apt install make gcc git libsecret-1-0 libsecret-1-dev libglib2.0-dev

# Compile binary
$ sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret

# Configure git to use binary as credential storage
@Konamiman
Konamiman / CH376 connected to Z80.md
Created August 21, 2021 16:35
"Recipe" to connect a CH376 to a Z80 via I/O port

How to connect a CH376 to a Z80 via I/O ports 20h and 21h (compatible with Rookie Drive):

Z80 74HC688 CH376
5V 5V 5V
GND GND GND
D7...D0 D7...D0
RD RD
WR WR
A0 A0

OSDSYS image resource image information

The information in this documentation does not apply to the early Protokernel consoles which has a very different OSDSYS program.

The images stored in the ROM are in a compressed format, so decompress before use. The following is the implementation of the decompression routine: https://gist.github.com/uyjulian/14388e84b008a6433aa805f5d0436c87

The images stored in the ROM are raw image formats with no information attached, so the following table describes the extra information required to display the image.

| Filename | Size | Offset | Image format |

@lukas2511
lukas2511 / meraki-init.sh
Last active April 15, 2024 11:34
Meraki MS220-8P config without cloud bullshit
#!/bin/sh
# This script configures a meraki ms220-8p switch completely from scratch
# See https://leo.leung.xyz/wiki/Meraki_MS220-8P for rooting instructions
# You can keep config and config.local completely empty, but i'd recommend to add a configuration
# which isolates all ports from each other.
# Without that you might have switching loops on bootup (unlikely since STP keeps longer to initialize
# than it takes this script to take over, but it just feels cleaner).
@rbreaves
rbreaves / WaylandUbuntu19.10-AppTitle
Last active February 7, 2024 12:02
Grab wmclass name or Window Name/Title under Wayland with Gnome 3.x
# Single Command, runs 2 calls to gdbus to get the currently active Window from Gnome 3.x
# Escaped so you can copy and paste into terminal directly
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\)[`gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\).findIndex\(a\=\>a.meta_window.has_focus\(\)===true\) | cut -d"'" -f 2`].get_meta_window\(\).get_wm_class\(\) | cut -d'"' -f 2
# Unescaped version, will not run
# Broken down into 2 commands.
# Call to Gnome to get the array location of the active Application
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m \
@balika011
balika011 / PSX_rel.cpp
Last active April 29, 2024 09:25
This tool can be used to decrypt PSX package binaries, like main.rel. (You need to bring your own key!)
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <openssl/aes.h>
#include <openssl/rsa.h>
#include <algorithm>
#include <openssl/sha.h>
#pragma pack(push, 1)
struct npCoreKey
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
uint32_t decompress_osdsys(uint8_t *src, uint8_t *dst)
{
uint32_t run = 0;
@Juul
Juul / lte_mbim_from_scratch.md
Last active May 6, 2024 15:17
How to use 4G LTE modems like the MC7455 on both Debian/Ubuntu and OpenWRT using MBIM

The purpose of this document is to get you familiar with the concepts and command line tools involved with connecting to the internet using modern 4G LTE modems on both Debian/Ubuntu and OpenWRT.

This writeup is based on my experiences with the Sierra Wireless AirPrime MC7455 modem and a Calyx (Sprint) SIM card, but it should apply to most modern 4G LTE modems.

High level overview

These are the steps required:

  • Physically connect antennas
@rstanleyhum
rstanleyhum / restic-windows-vss.ps1
Last active January 13, 2023 21:55
Restic Backup Windows Volume Shadow Copy Service script taken from https://github.com/restic/restic/issues/340
# Windows PowerShell Script to use restic to backup files using the Volume Shadow Copy Service, allowing
# that are in use to be backed up. The script must be run with elevated privileges.
# The Volume Shadow Copy Service must be enabled for the disk volume that contains the files to be backed up.
#
# Parameters
$resticExe = 'C:\Users\Username\go\bin\restic.exe'
$resticRepository = '\\SYNOLOGY212J\backups\restic-workstation'
$rootVolume = "C:\"
# List of folders to backup, separated by commas
$foldersToBackup = @(
@bantu
bantu / 00-status.md
Last active February 16, 2024 12:16
Seagate BlackArmor 4XX (e.g. 400, 420, 440) NAS

Device Status

  • A serial cable was soldered onto the board's CN4 connector which can be used for debugging.
  • A USB drive is attached containing a debootstrapped Debian Jessie armel on an ext4 filesystem.
  • The original flash was completely erased.
  • A new version of u-boot provided by Evgeni was installed onto the flash.
  • The new u-boot version is capable of loading files from ext4 filesystems, the old one was not.
  • u-boot loads three files: /boot/uInitrd, /boot/uDtb, /boot/uImage
  • The kernel is provided by the linux-image-kirkwood debian package.