Skip to content

Instantly share code, notes, and snippets.

@emory
emory / disable_discimage.reg
Created April 9, 2023 20:44 — forked from wdormann/disable_discimage.reg
Disable Windows Explorer file associations for Disc Image Mount (ISO, IMG, VHD, VHDX)
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\.iso]
[-HKEY_CLASSES_ROOT\Windows.IsoFile\shell\mount\command]
[-HKEY_CLASSES_ROOT\.img]
[-HKEY_CLASSES_ROOT\.vhdx]
@daemonhorn
daemonhorn / freebsd_yubikey_authentication.md
Last active March 14, 2024 01:31
Setting up yubikey/solo2 for piv, fido, and gpg on FreeBSD (Firefox, Chromium, PAM, SSH, and GnuPG)

Overview

How to configure FreeBSD and applicable applications to work with Yubikey for authentication. This serves as my work-in-progress documentation of the configuration knobs needed to make this work properly.

  • FreeBSD ssh with piv smartcard slot on Yubikey (pkcs11 via libykcs11.so)
  • FreeBSD ssh with fido support on Yubikey
  • FreeBSD Firefox/Chromium with fido + webauthn support on Yubikey
  • FreeBSD local console and gdm authentication using pam on Yubikey
  • FreeBSD official YubiKey tools

Latest Tested FreeBSD versions

  • FreeBSD 13.2 Testing (Aug 2023)
  • FreeBSD stable/13 Testing (Aug 2023) with OpenSSH_9.3p2
@jinschoi
jinschoi / histogram_sub.py
Created June 2, 2022 23:23
Plot a histogram of Flipper raw .sub files
import re
import sys
import pandas as pd
import matplotlib.pyplot as plt
filename = sys.argv[1]
segs = []
with open(filename, 'r') as f:
for line in f:
@craysiii
craysiii / README.md
Created April 20, 2022 03:07
Setting Up Chiaki for Direct Launch on Steam Deck / Steam ROM Manager

Hello everyone,

I was really annoyed with the default setup of Chiaki through the guides I have used to get it running on my Steam Deck. I was having issues with the UI being very glitchy when starting in Gaming Mode and it failing to disappear when I woke up / selected my PS5. It would also sometimes fail to read button presses from L4, which would break the functionality of pressing the PS button. I thought that there had to be another way, and now I've figured it out and thought I would share in case it wasn't done already.

These are the steps I took:

  1. Download or build a custom AppImage that enables the additional CLI options for Chiaki.
    1. You can either download the version that I built here: Chiaki.AppImage
    2. Or, if you don't trust the AppImage (I don't blame you), you can build it by doing the following:
  2. On a linux machine with docker installed and running, as well as SELinux/AppL
@jinschoi
jinschoi / bitstream-from-sub.py
Created April 17, 2022 18:00
Python script to clean up and recover an OOK bitstream from a Flipper RAW .sub file.
#!/usr/bin/env python
# Find the raw bitstring from a captured Flipper RAW .sub file.
# Must provide the bitlength in ms, and the allowable error which can be tolerated.
import re
import sys
import math
filename = sys.argv[1]
@jinschoi
jinschoi / nscd.sub
Created March 25, 2022 02:02
de Bruijn .sub file for Flipper Zero for NSCD garage doors
Filetype: Flipper SubGhz RAW File
Version: 1
Frequency: 318000000
Preset: FuriHalSubGhzPresetOok650Async
Protocol: RAW
RAW_Data: 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 4000 -500 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 4000 -500 4000 -500 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 4000 -500 500 -4000 4000 -500 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 4000 -500 500 -4000 4000 -500 4000 -500 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 500 -4000 4000 -500 4000
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@rberenguel
rberenguel / obsidianTodayWidget.js
Last active August 20, 2023 20:41
Quick-and-dirty Scriptable (https://scriptable.app/) script to show a medium widget with today's tasks from Obsidian, for my set up (today is in journal/YYYYMMDD.md, tasks are under the `### Plan` heading). Optionally pass "tomorrow" as widget arg to render tomorrow (if it doesn't exist it will fail of course)
let when = args.widgetParameter || 'today'
let now = new Date()
if (when == 'tomorrow') {
now.setDate(now.getDate() + 1);
}
let formatter = new DateFormatter()
formatter.dateFormat = 'yyyyMMdd'
let today = formatter.string(now)
@gjrdiesel
gjrdiesel / README.md
Last active April 25, 2024 01:42
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part