Skip to content

Instantly share code, notes, and snippets.

View lanrat's full-sized avatar
😎
👨‍💻

Ian Foster lanrat

😎
👨‍💻
View GitHub Profile
@thelastlin
thelastlin / libsk-libfido2_BUILD_FROM_OPENSSH.md
Last active March 22, 2025 14:07
Build libsk-libfido2.so from OpenSSH-portable

Tested on macOS Sonoma Developer beta 2 (23A5276g)

Build libsk-libfido2.so

Prerequisite

  1. Download openssh-portable source code, install libcrypto, libfido2;
  2. Configure openssh-portable build system by ./configure # [options].

Apply patch

#include <stdio.h>
#include <stdint.h>
// Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc
uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo
{
while(len--)
{
crc ^= *buffer++ << 8;
int bits = 0;
do
@piitaya
piitaya / assist_calendar.yaml
Last active October 3, 2024 09:01
Assist Calendar Blueprint
blueprint:
name: Assist Calendar
author: Piitaya
description: Use Assist and a calendar to schedule actions in natural language.
domain: automation
input:
calendar:
name: Calendar
description: All events in this calendar will be processed by Assist
selector:
@rigwild
rigwild / patch_apk.md
Last active March 7, 2025 23:21
Full tutorial to patch APKs on Android using apk-mitm and APKLab. Support for bundle APKs.

Patch APK

Full tutorial to patch APKs on Android using apk-mitm and APKLab. Support for bundle APKs.

Pull APK

adb shell pm list packages
adb shell pm path <package_name>
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active May 1, 2025 22:26
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@yaythomas
yaythomas / README.md
Last active February 27, 2025 09:24
convert flat hugo content pages to leaf bundles

convert hugo content files to page leaf bundles

This pipeline converts Hugo content pages to page leaf bundles.

From:

`-- content
    |-- about.md
    `-- post
 |-- content-1.md
@Nizzle
Nizzle / shabadge.yaml
Last active December 12, 2024 09:22
ESPhome config for SHA2017 badge (https://wiki.sha2017.org/w/Projects:Badge)
esphome:
name: shabadge
esp32:
board: esp32-pro
logger:
wifi:
ssid: !secret wifi_ssid
@exavolt
exavolt / Dockerfile
Last active February 26, 2025 04:13
Containerized Hugo (extended) with VSCode devcontainer
FROM golang:1.13-alpine
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
ARG VARIANT=hugo_extended
# VERSION can be either 'latest' or a specific version number
ARG VERSION=latest
RUN apk add --update --no-cache ca-certificates openssl git curl && \
case ${VERSION} in \
latest) \
  1. Insert the unifying receiver.
  2. Download and Install the latest Unifying Receiver software. (version 250, firmware 024.010.00036 at time of writing)
  3. Download and Install the latest SetPoint software. (version 6.69.126, firmware 041.001.00038 at time of writing)
  4. Sync the T650 to your unifying receiver.
  5. Open SetPoint and make any changes to the SetPoint configuration for your T650.
    • You may need to restart the T650 and SetPoint for initial detection.
  6. Exit/close the SetPoint software (make sure it is fully closed and not in the tasktray)
  7. Open the Properties for C:\Program Files\Logitech\SetPointP\SetPoint.exe
#!/usr/bin/env python3
from collections import namedtuple
import socket
import struct
usbip_user_op_common = namedtuple('usbip_user_op_common', 'version code status')
usbip_usb_device = namedtuple('usbip_usb_device', 'path busid busnum devnum speed idVendor idProduct bcdDevice bDeviceClass bDeviceSubClass bDeviceProtocol bConfigurationValue bNumConfigurations bNumInterfaces')
usbip_header_basic = namedtuple('usbip_header_basic', 'command seqnum devid direction ep')