Skip to content

Instantly share code, notes, and snippets.

View bbars's full-sized avatar

Denis Borzenko bbars

  • St. Petersburg, Russia
View GitHub Profile
@cr3ative
cr3ative / jiggler.md
Last active June 25, 2023 14:12
Making an inexpensive USB Mouse Jiggler, with slightly better USB Descriptor (PID, VID, Manufacturer)

Making a half-convincing USB Mouse Jiggler on the cheap

I object to USB Mouse Jigglers being £20-£30 on Amazon for something a microcontroller should be able to do with ease, in an unconfigurable/unknown state when it comes to how they describe themselves to the host machine.

We can do better, with a reprogrammable version for about £6.

There are existing guides to each part of this, and I've linked them inline. Here's a great one for people less familiar with Arduino, but this guide assumes basic knowledge of Arduino.

Hardware

@maximtereshchenko
maximtereshchenko / generate-tls-certificates.sh
Created December 5, 2021 13:51
Generate tls certificates, keystore, truststore for Spring Boot
#!/usr/bin/env bash
CA_PRIVATE_KEY='CA-private-key.key'
CA_SUBJECT='/CN=Certificate authority/'
CA_CERTIFICATE_SIGNING_REQUEST='CA-certificate-signing-request.csr'
CA_SELF_SIGNED_CERTIFICATE='CA-self-signed-certificate.pem'
SERVER_PRIVATE_KEY='Server-private-key.key'
SERVER_SUBJECT='/CN=localhost/'
SERVER_CERTIFICATE_SIGNING_REQUEST='Server-certificate-signing-request.csr'
SERVER_CERTIFICATE='Server-certificate.pem'
@thecoder08
thecoder08 / hamming.js
Created July 22, 2021 18:25
Example Hamming Code implementation in Javascript
// hamming.js: Hamming code in javascript
// take 11-bit arbitrary data, return 16-bit hamming code
function prepare(arbitraryData) {
var hammingOutput = [];
hammingOutput[0] = 0;
hammingOutput[1] = arbitraryData[0] ^ arbitraryData[1] ^ arbitraryData[3] ^ arbitraryData[4] ^ arbitraryData[6] ^ arbitraryData[8] ^ arbitraryData[10];
hammingOutput[2] = arbitraryData[0] ^ arbitraryData[2] ^ arbitraryData[3] ^ arbitraryData[5] ^ arbitraryData[6] ^ arbitraryData[9] ^ arbitraryData[10];
hammingOutput[3] = arbitraryData[0];
hammingOutput[4] = arbitraryData[1] ^ arbitraryData[2] ^ arbitraryData[3] ^ arbitraryData[7] ^ arbitraryData[8] ^ arbitraryData[9] ^ arbitraryData[10];