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 April 23, 2024 02:59
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 March 7, 2024 23:10
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:
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active May 6, 2024 01:14
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 10, 2024 20:45
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 April 26, 2024 08:47
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
  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')
{
// Controls whether the editor shows CodeLens.
"diffEditor.codeLens": false,
// When enabled, the diff editor ignores changes in leading or trailing whitespace.
"diffEditor.ignoreTrimWhitespace": true,
// Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.
"diffEditor.maxComputationTime": 5000,
@bluetidepro
bluetidepro / remove-advertisers.js
Last active December 29, 2023 06:27
Auto click "remove" on all facebook advertisers and Twitter interests
// I did this in Chrome...
//
// Go to https://www.facebook.com/ads/preferences/
// Click the "Advertisers" section to open it up.
// Click "See more" once
// Before doing anything else, just keep clicking space bar to trigger the "see more" button
// Do this for a bit until all the advertisers are loaded
// then run this below in the dev tools console...
// (It will take a few minutes, depending how many you have, and your browser may lock up, but once it's done you will see it auto clicked the "remove" X in the top right for all of them)