Skip to content

Instantly share code, notes, and snippets.

View juliusmarminge's full-sized avatar

Julius Marminge juliusmarminge

View GitHub Profile
@juliusmarminge
juliusmarminge / edgedb-adapter.ts
Created May 5, 2024 12:12
An Auth.js EdgeDB Adapter with support for webauthn
import type { Adapter, AdapterAccount } from "next-auth/adapters";
import { edgedb } from "~/db/client";
import e from "@edgedb";
export const edgedbAdapter = {
createUser: async ({ id, ...data }) => {
const user = await e
.select(e.insert(e.User, { ...data }), (user) => user["*"])
.run(edgedb);
@juliusmarminge
juliusmarminge / README.md
Last active September 21, 2023 09:51
next cpu prof
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument */
import chalk from 'chalk'
interface Logger {
debug(message: string, ...optionalParameters: any[]): void
info(message: string, ...optionalParameters: any[]): void
warn(message: string, ...optionalParameters: any[]): void
error(message: string, ...optionalParameters: any[]): void
[x: string]: any
}
@juliusmarminge
juliusmarminge / enum-generator.ts
Last active May 6, 2024 17:22
prisma enum generator
import { generatorHandler } from "@prisma/generator-helper";
import fs from "node:fs/promises";
import path from "node:path";
const header = `// This file was generated by a custom prisma generator, do not edit manually.\n`;
generatorHandler({
onManifest() {
return {
defaultOutput: "./enums/index.ts",
int main() {
return 0;
}
import enum
import math
import random as r
# Maze props
HEIGHT = 20
WIDTH = 33
OBSTACLE = 1000
FLOOR = 1

Poimandres Warp Theme

Made a Warp theme based on the Poimandres VSCode Theme.

Install

  1. Copy the base16_pmndrs.yaml file into ~/.warp/themes
wget https://gist.githubusercontent.com/juliusmarminge/ea45f0f2c627ee8d1778404f4642986d/raw/5ea3cd5bf7f18c6a3f08a29edabfca5b59bc2778/base16_pmndrs.yaml -o ~/.warp/themes