Skip to content

Instantly share code, notes, and snippets.

@sandyjmacdonald
sandyjmacdonald / code.py
Last active November 9, 2024 16:42
CircuitPython USB MIDI to serial MIDI converter for Raspberry Pi Pico (RP2040)
# CircuitPython USB MIDI to serial MIDI converter for Raspberry Pi Pico (RP2040).
# IMPORTANT! Should *only be used for MIDI in*, i.e. from USB devices to hardware
# MIDI synths, and *not* in the opposite direction. Doing so could risk damage to
# the microcontroller, your computer, or both.
# Wire a 10Ω resistor from the Tx pin on the Raspberry Pi Pico or other
# RP2040 board to the 3.5mm stereo jack tip, a 33Ω resistor from the 3v3 pin on
# the Raspberry Pi Pico to the 3.5mm stereo jack ring, and the ground pin on the
# Raspberry Pi Pico to the 3.5mm stereo jack sleeve.
@tuansoibk
tuansoibk / cryptography-file-formats.md
Last active September 22, 2024 14:54
Cryptography material conversion and verification commands
  1. Introduction
  2. Standards
  3. Common combinations
  4. Conversion
  5. Verification/Inspection
  6. Tips for recognising

Introduction

It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.

tell application "Capture One 20"
set imageNames to ""
repeat with variantItem in (get selected variants)
-- Set the white balance to 2400K, -12 tint
set adj to (get adjustments of variantItem)
set temperature of adj to 2400
set tint of adj to -12
-- Set linear curve
@MitchellKehn
MitchellKehn / fspyNukeImporter.py
Last active December 15, 2023 13:12
[Import fSpy JSON to Nuke] load a json file with camera data from fSpy into Nuke for single frame camera alignment https://fspy.io/ #fspy #nuke
import json
import nuke
def Matrix4toList(M):
mVals = []
for i in range(len(M)):
mVals.append(M[i])
return mVals
# --- load file ---
@kbeckmann
kbeckmann / ConvertRawToSDRAngel.py
Created May 19, 2019 19:28
Convert RAW iq samples to SDRAngel "sdriq" format
import sys
import struct
import binascii
# See https://github.com/f4exb/sdrangel/tree/master/plugins/samplesource/filesource
data = open(sys.argv[1], "rb").read()
out = open(sys.argv[2], "wb")
w = bytearray()
@jedypod
jedypod / HexGenerator.nk
Last active December 17, 2018 12:37
Generates a Hex Pattern
set cut_paste_input [stack 0]
version 5.2 v1
Group {
inputs 0
name HexGenerator
selected true
xpos -50
ypos -482
addUserKnob {20 HexGenerator}
addUserKnob {41 format T HexGenCalc.format}
@GarryOne
GarryOne / insta_login_check.js
Created September 8, 2018 21:27
Puppeteer Instagram Credentials/Login Verification
// start the node server by doing: `node insta_login_check.js`
const puppeteer = require('puppeteer');
const delay = require('delay');
const user = {
username: '[email protected]',
password: 'passw0rd',
};
@ndunks
ndunks / mount-ubi-using-mtdram.sh
Created July 19, 2018 03:24
How to mount UBI image using mtdram kernel module on linux/debian
#!/bin/bash
if [ ! -d files ]; then
# Make the content
echo "Generating root content.."
mkdir files
echo "$(date)" > files/date.txt
echo "Another content" > files/other.txt
fi
#These config are based by Nand device that you will use!
@sdalu
sdalu / lcd_hat_rpi.md
Last active August 7, 2022 13:33
LCD display HAT for Raspberry Pi
@bahorn
bahorn / tuya_cloud.py
Created January 31, 2018 20:36
Cloud endpoint
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# Fixed up version of my previous code to work with the Cloud endpoints.
# Hopefully this works.