Skip to content

Instantly share code, notes, and snippets.

@datadiode
datadiode / boot.py
Created October 5, 2021 11:35
Bitlocker PIN dongle based on Raspberry Pi Pico running CircuitPython firmware
import board
import digitalio
import time
import storage
storage.disable_usb_drive()
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
@datadiode
datadiode / build-x64.bat
Created January 12, 2023 20:12 — forked from lesnerchen/build-x64.bat
Build Qt 5.5.1 from source with MSVC 2015 on Windows
REM http://pempek.net/articles/2015/10/18/compiling-qt-5-5-1-with-visual-studio-2015/
REM Set up \Microsoft Visual Studio 2015
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
ECHO ON
SET _CD=%CD%
SET _PATH=%PATH%
SET ICU_SOURCE=%_CD%\tools\icu-54.1\source
SET ICU_DIST=%_CD%\tools\icu-54.1\dist-64
@datadiode
datadiode / raising_and_falling_edge_buttons.html
Last active May 25, 2024 14:51
CSS and HTML to create buttons with raising and falling edge symbols
<style>
button u, button p { display: inline-block; margin: 0;
height: 2.4ex; width: 1ex; border-style: solid; }
button u:first-child { border-width: 0 1px 2px 0; }
button p:last-child { border-width: 2px 0 0 1px; }
button p:first-child { border-width: 2px 1px 0 0; }
button u:last-child { border-width: 0 0 2px 1px; }
</style>
<button><u></u><p></p></button>
@datadiode
datadiode / KillTmmonThread.cpp
Created May 26, 2024 08:24 — forked from frankyueh/KillTmmonThread.cpp
Find Tmmon hooked thread and kill it (CPU usage too high...) (Use task manager to execute it as System previlege)
// KillTmmonThread.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <windows.h>
#include <tlhelp32.h>
#include <tchar.h>
#include <Shlwapi.h>
@datadiode
datadiode / ucrt-csv.py
Created June 10, 2024 06:53 — forked from njsmith/ucrt-csv.py
Information on linking to the new Windows UCRT
import sys
import subprocess
import csv
def describe_ucrt_lib(platform):
lib_path = "windows-10-sdk/Lib/10.0.10240.0/ucrt/{}/ucrt.lib".format(platform)
output = subprocess.check_output(["nm", lib_path])
output = output.decode("utf-8")
# Output (x86 32-bit) looks like:
@datadiode
datadiode / endian.hpp
Last active July 7, 2024 08:26 — forked from NikolasK-source/endian.hpp
C++ header to handle endianness (C++17)
/*
* Copyright (C) 2022 Nikolas Koesling <nikolas@koesling.info>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
* Software.
@datadiode
datadiode / Redox_VBox.md
Created July 20, 2024 06:56 — forked from Daeraxa/Redox_VBox.md
Some basic config notes for setting up Redox on VirtualBox