Skip to content

Instantly share code, notes, and snippets.

@xlz
xlz / max-cpu.sh
Created February 22, 2016 21:20
Jetson TK1 performance max
#!/bin/sh
# Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
echo "$ sudo "$0""
exit
fi
# To obtain full performance on the CPU (eg: for performance measurements or benchmarking or when you don't care about power draw), you can disable CPU scaling and force the 4 main CPU cores to always run at max performance until reboot:
@xlz
xlz / firmware-5.txt
Last active August 21, 2016 17:21
Readable Kinect v2 USB transactions
0000000 53 69 67 6e 0c 01 00 00 00 00 00 00 78 44 79 5c >Sign........xDy\<
0000020 f2 f0 6a 24 c5 2f 3f 13 5e 7c 71 72 aa 5e b8 c3 >..j$./?.^|qr.^..<
0000040 da d1 8f 22 0a ec c6 dc be e9 c6 7f ef 4c 8f b4 >...".........L..<
0000060 d5 db 9a 28 04 a5 bc 2d 2b 18 31 bd 6e 85 fa a3 >...(...-+.1.n...<
0000100 21 53 18 86 21 73 30 27 77 ac d7 e6 ef aa 40 ca >!S..!s0'w.....@.<
0000120 20 a2 dc d8 b7 e1 e3 d6 16 65 2d d5 f4 74 31 b2 > ........e-..t1.<
0000140 b8 d3 cd 5c 50 fe 06 44 47 7c 84 48 04 d2 19 91 >...\P..DG|.H....<
0000160 af f0 ae a4 ba ad 47 3a 1e 8c 05 29 09 03 5d 24 >......G:...)..]$<
0000200 69 d3 56 f0 2f 09 90 37 7c 8b df 58 7b 13 0f fa >i.V./..7|..X{...<
0000220 0d f4 33 41 a1 f6 3a 6f 02 b9 26 7d da 1b df f6 >..3A..:o..&}....<
@xlz
xlz / blocks.cc
Last active February 4, 2022 00:46
Microsoft Puzzle Box Solver
// g++ -std=c++11 -O3 blocks.cc -o blocks
#include <iostream>
#include <vector>
#include <bitset>
#include <queue>
#include <unordered_map>
#include <algorithm>
#include <cstdint>
#include <sstream>
#include <string>