Skip to content

Instantly share code, notes, and snippets.

View nathankellenicki's full-sized avatar

Nathan Kellenicki nathankellenicki

View GitHub Profile
export MARKPATH=$HOME/.marks
function jump {
cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1"
}
function mark {
mkdir -p $MARKPATH; ln -s "$(pwd)" $MARKPATH/$1
}
function unmark {
rm -i $MARKPATH/$1
}
@nathankellenicki
nathankellenicki / hwnftg.js
Last active October 28, 2022 21:57
Code for finding unique owners of Hot Wheels NFT Garage series's
import axios from "axios";
import moment from "moment";
const Series = {
"Series 1 Employee Rodger Dodger": ["401460"],
"Series 1": ["353670", "353671", "353672", "353673", "353674", "353675", "353676", "353677", "353678", "353679", "353680", "353681", "353682", "353683", "362065", "353685", "353686", "353687", "353688", "353689", "353690", "353691", "362066", "353693", "353694", "353695", "353696", "353697", "353698", "362067", "353700", "353701", "353702", "353703", "353704", "362068", "353706", "353707", "353708", "353709"],
"Series 2": ["476736", "473693", "473694", "473695", "473696", "473697", "473698", "473699", "473700", "476737", "473702", "473703", "473704", "473705", "473706", "473707", "473708", "473709", "473710", "476738", "473712", "473713", "473714", "473715", "473716", "473717", "473718", "473719", "473720", "476739", "473722", "473723", "473724", "473725", "473726", "473727", "473728", "473729", "473730", "476740", "473732", "473733", "473734"],
"Series 3": ["542222", "54222
<!DOCTYPE html>
<html lang="en">
<head>
<title>Wordle Solver</title>
</head>
<body>
<div id="suggestions"></div>
<input id="answer" /> <button id="answer_button">Go</button>
<script>
const PoweredUP = require("node-poweredup");
const poweredUP = new PoweredUP.PoweredUP();
poweredUP.scan();
console.log("Looking for Hubs...");
poweredUP.on("discover", async (hub) => {
await hub.connect();
// Simple metrics gathering
export default class SimpleMetrics {
constructor () {
this.mainStartTime = +(new Date());
this.startTimings = {};
this.reportedTimings = [];
}
startTiming () {
lpf2hubmodeinfo Port 00, type 0025 (COLOR_DISTANCE_SENSOR) +8s
lpf2hubmodeinfo Port 00, hardware version 1.0.00.0000, software version 1.0.00.0000 +0ms
lpf2hubmodeinfo Port 00, total modes 11, input modes 11001011111, output modes 00010100000 +30ms
lpf2hubmodeinfo Port 00, mode combinations [1001111] +45ms
lpf2hubmodeinfo Port 00, mode 0, name COLOR +15ms
lpf2hubmodeinfo Port 00, mode 0, RAW min 0, max 10 +30ms
lpf2hubmodeinfo Port 00, mode 0, PCT min 0, max 100 +30ms
lpf2hubmodeinfo Port 00, mode 0, SI min 0, max 10 +30ms
lpf2hubmodeinfo Port 00, mode 0, SI symbol IDX +30ms
lpf2hubmodeinfo Port 00, mode 0, Value 1 x 8bit, Decimal format 3.0 +44ms
@nathankellenicki
nathankellenicki / hwid.js
Created March 18, 2020 03:39
HWid Decryption Functions
private _parseHandshake (handshake: Buffer) {
const publicKey = handshake.slice(25, 58);
const salt = handshake.slice(132, 136);
this._theirPublicKey = publicKey;
this._theirSalt = salt;
}
private _sendHandshake () {
const ecdh = crypto.createECDH("prime256v1");
@nathankellenicki
nathankellenicki / index.html
Last active March 6, 2022 04:28
Bank of the Core GCC-1000 Currency Converter
<!DOCTYPE html>
<html>
<head>
<title>Bank of the Core GCC-1000 Currency Converter</title>
<style>
.strike {
text-decoration: line-through;
}
</style>
<script>
Looking for Hubs...
Connected to NK_DuploCargo!
lpf2hubmodeinfo Port 00, type 0029 (DUPLO_TRAIN_BASE_MOTOR) +0ms
lpf2hubmodeinfo Port 00, hardware version 0.0.00.0001, software version 0.0.00.0001 +1ms
Attached device 41 to undefined
lpf2hubmodeinfo Port 01, type 002a (DUPLO_TRAIN_BASE_SPEAKER) +1ms
lpf2hubmodeinfo Port 01, hardware version 0.0.00.0001, software version 0.0.00.0001 +0ms
Attached device 42 to undefined
lpf2hubmodeinfo Port 11, type 0017 (HUB_LED) +0ms
lpf2hubmodeinfo Port 11, hardware version 0.0.00.0001, software version 0.0.00.0001 +1ms