Skip to content

Instantly share code, notes, and snippets.

View jbosboom's full-sized avatar

Jeffrey Bosboom jbosboom

  • 00:28 (UTC -07:00)
View GitHub Profile
@jbosboom
jbosboom / bluetooth-0a12:0001.txt
Created December 22, 2024 05:41
lsusb: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Negotiated speed: Full Speed (12Mbps)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 224 Wireless
bDeviceSubClass 1 Radio Frequency
bDeviceProtocol 1 Bluetooth
bMaxPacketSize0 64
@jbosboom
jbosboom / thps2-codes-hashes.txt
Created December 7, 2024 08:05
Tony Hawk's Pro Skater 2 cheat code hash reversal
0517f426 ce112df2 XDLRDLR
0517f426 2d98ff2a LLDUSULCDRX
0517f426 6d2cc6b1 DUCCSSDTRRU
0517f426 bf8583d4 LTLDTDXLTXU
0517f426 171934ee LTRRUXUXLLLU
0517f426 19a08350 RLCLLSXLRRRS
0517f426 45c608f3 UXDDXDXTURTU
0517f426 4c95e6d0 RSSTCUXSTRSX
0517f426 5fee3e10 LXSXXRTDTRXC
0517f426 61bdc7dd CLDSRTLSDCDS
@jbosboom
jbosboom / Player.log
Created September 13, 2024 07:52
shapez 2 crash on focus loss log
Mono path[0] = '/home/jbosboom/.local/share/Steam/steamapps/common/shapez 2/shapez 2_Data/Managed'
Mono config path = '/home/jbosboom/.local/share/Steam/steamapps/common/shapez 2/shapez 2_Data/MonoBleedingEdge/etc'
Preloaded 'libFileBrowser.so'
Preloaded 'libProcessStart.so'
Preloaded 'lib_burst_generated.so'
Preloaded 'libsteam_api.so'
Unable to preload the following plugins:
sqlite3.so
Display 0 'LG HDR 4K 27"': 3840x2160 (primary device).
[PhysX] Initialized MultithreadedTaskDispatcher with 32 workers.
REFINER RECIPES:
Carbon (Unrefined Organic Element) used by 21
1 Condensed Carbon -> 2 Carbon
1 Oxygen -> 1 Carbon
1 Fungal Mould -> 2 Carbon
1 Gamma Root -> 2 Carbon
1 Cactus Flesh -> 2 Carbon
1 Solanium -> 2 Carbon
1 Star Bulb -> 2 Carbon
@jbosboom
jbosboom / sqlite-doc-dark.user.css
Last active June 24, 2021 07:46
SQLite documentation dark mode user CSS
/* ==UserStyle==
@name SQLite documentation dark mode
@namespace jeffreybosboom.com
@version 1.0.0
@description SQLite documentation dark mode
@author Jeffrey Bosboom
==/UserStyle== */
@-moz-document domain("sqlite.org") {
:root {
// ==UserScript==
// @name Arch Linux Manpages Sidebar TOC
// @namespace jeffreybosboom.com
// @author Jeffrey Bosboom
// @description Makes the sidebar about the table of contents (best used with some user CSS)
// @version 1
// @match https://man.archlinux.org/man/*
// @grant none
// @inject-into content
// ==/UserScript==
@jbosboom
jbosboom / partial-clone-sparse-checkout-bare-repository.md
Last active May 29, 2021 08:17
Simulating sparse checkout in a partial clone bare repository

Simulating sparse checkout in a partial clone bare repository

Background

Partial clone is a git feature allowing a local repository to contain only a subset of a remote repository's trees and blobs, fetching missing objects lazily. Sparse checkout is a separate git feature allowing a working tree to contain only a subset of the files tracked by the repository. Used together, partial clone and sparse checkout allow working with large multi-project repositories ("monorepos") and repositories containing large binary files without having to download and store a full copy of the data in the repository. (Shallow clone is a distinct git feature that limits the commits stored in the local repository.)

For example, consider jbosboom/test-partial-clone-sparse-checkout, which tracks a few text files and some large images. If we want to work on the text files, but don't need the images, we can avoid downloading and storing them in our local rep

#!/usr/bin/env python3
import pickle, io, collections, sys
x = collections.deque()
x.append(10)
x.append(3.14)
x.append(10000000000000)
x.append((1, 2, 3))
x.append([1, 2, 3])
#!/usr/bin/env python3
import sys, os
samples = 100
sample_size = 25 * 1024 * 1024
with open(sys.argv[1], 'rb') as input, open(sys.argv[2], 'w+b') as output:
total_size = os.fstat(input.fileno()).st_size
sampled_size = samples * sample_size
@jbosboom
jbosboom / lmdb-bench.cpp
Created August 30, 2020 21:48
LMDB benchmark testing sorted vs unsorted insert order for a hashtable
#include "precompiled.hpp"
#include "stopwatch.hpp"
#include "lmdb++.h"
int main() { //genbuild {'entrypoint': True, 'ldflags': '-llmdb'}
lmdb::env env = lmdb::env::create();
env.set_mapsize(1UL * 1024 * 1024 * 1024 * 1024);
env.set_max_dbs(64);
env.open(std::string("/home/jbosboom/scratch/benchmark.mdb").c_str(), MDB_NORDAHEAD); //TODO: flags?