Skip to content

Instantly share code, notes, and snippets.

View jacobhq's full-sized avatar

Jacob Marshall jacobhq

View GitHub Profile
@jacobhq
jacobhq / FourStageSlides.java
Last active March 14, 2025 17:17
Gobilda Four Stage Slides Test
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.hardware.DcMotorSimple;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.Servo;
import com.qualcomm.robotcore.util.ElapsedTime;
import com.qualcomm.robotcore.util.Range;
@jacobhq
jacobhq / error.md
Created January 18, 2025 10:50
Tuono hydration error
hook.js:608 A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:

- A server/client branch `if (typeof window !== 'undefined')`.
- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.

It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
@jacobhq
jacobhq / logs.txt
Created January 14, 2025 18:32
tuono build logs
tuono on  main via ⬢ v22.12.0 via 🦀 v1.83.0
❯ pnpm build
> workspace@ build C:\Users\jacob\code\tuono
> turbo build --filter=./packages/*
╭──────────────────────────────────────────────────────────────────────────╮
│ │
│ Update available v2.2.3 ≫ v2.3.3 │
│ Changelog: https://github.com/vercel/turborepo/releases/tag/v2.3.3 │
@jacobhq
jacobhq / ElonsToyCar.java
Created October 23, 2024 13:13
ElonsToyCar as done live in Java Tutorial at Glyn.
public class ElonsToyCar {
private int distance;
private int battery = 100;
public static ElonsToyCar buy() {
return new ElonsToyCar();
}
public String distanceDisplay() {
return String.format("Driven %d meters", distance);
@jacobhq
jacobhq / tree.txt
Created July 18, 2024 09:53
wonnx-embeddings-repro output of `cargo tree`
wonnx-embeddings-repro v0.1.0 (C:\Users\jacob\code\wonnx-embeddings-repro)
|-- js-sys v0.3.69
| `-- wasm-bindgen v0.2.92
| |-- cfg-if v1.0.0
| `-- wasm-bindgen-macro v0.2.92 (proc-macro)
| |-- quote v1.0.36
| | `-- proc-macro2 v1.0.86
| | `-- unicode-ident v1.0.12
| `-- wasm-bindgen-macro-support v0.2.92
| |-- proc-macro2 v1.0.86 (*)
@jacobhq
jacobhq / tree.txt
Created July 16, 2024 20:50
wonnx-repro output of `cargo tree`
wonnx-repro v0.1.0 (C:\Users\jacob\code\wonnx-repro)
|-- wasm-bindgen v0.2.92
| |-- cfg-if v1.0.0
| `-- wasm-bindgen-macro v0.2.92 (proc-macro)
| |-- quote v1.0.36
| | `-- proc-macro2 v1.0.86
| | `-- unicode-ident v1.0.12
| `-- wasm-bindgen-macro-support v0.2.92
| |-- proc-macro2 v1.0.86 (*)
| |-- quote v1.0.36 (*)
@jacobhq
jacobhq / prisma.ts
Created November 4, 2022 14:24
Use prisma in nextjs with autocomplete and connection pooling.
import { PrismaClient } from "@prisma/client";
// PrismaClient is attached to the `global` object in development to prevent
// exhausting your database connection limit.
//
// Learn more:
// https://pris.ly/d/help/next-js-best-practices
const prismaClientPropertyName = `__prevent-name-collision__prisma`
type GlobalThisWithPrismaClient = typeof globalThis & {

Keybase proof

I hereby claim:

  • I am jacobhq on github.
  • I am jacobhq (https://keybase.io/jacobhq) on keybase.
  • I have a public key ASC7iIbvgLzLWbLyp0ynDB1ssEY_fRDc8rRZsV31LnWVTwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jacobhq on github.
  • I am jhqcat (https://keybase.io/jhqcat) on keybase.
  • I have a public key ASCH-U1bfqleeG9R-hKh3t1Om7U4A79Ar9rj79Jl6PzI3Qo

To claim this, I am signing this object:

@jacobhq
jacobhq / post-email.css
Created March 2, 2021 12:31
The stylesheet used on all post emails
/* Reset */
a,
table,
td {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
table,
td {
mso-table-lspace: 0;