Skip to content

Instantly share code, notes, and snippets.

View jacobhq's full-sized avatar

Jacob Marshall jacobhq

View GitHub Profile
@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;
@jacobhq
jacobhq / DesikitToggles.vue
Created November 15, 2020 11:41
Desikit toggles
<template>
<div>
<h5 class="mt-3">Toggleable Button</h5>
<b-button :pressed.sync="myToggle" variant="primary">Toggle Me</b-button>
<p>Pressed State: <strong>{{ myToggle }}</strong></p>
<h5>In a button group</h5>
<b-button-group size="sm">
<b-button
v-for="(btn, idx) in buttons"
Verifying my Blockstack ID is secured with the address 1TQcXNeJ23fHke9amnnMBTHKmMpg3XvsQ https://explorer.blockstack.org/address/1TQcXNeJ23fHke9amnnMBTHKmMpg3XvsQ