For anyone considering the use of ULIDs in MySQL with drizzle
, here's a ready-to-use ULID
type for your convenience.
import { Ulid as ULID } from "id128";
export const ulid = customType<{
data: string;
notNull: true;
default: false;
For anyone considering the use of ULIDs in MySQL with drizzle
, here's a ready-to-use ULID
type for your convenience.
import { Ulid as ULID } from "id128";
export const ulid = customType<{
data: string;
notNull: true;
default: false;
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
create or replace function uuid_generate_v7() | |
returns uuid | |
as $$ | |
begin | |
-- use random v4 uuid as starting point (which has the same variant we need) | |
-- then overlay timestamp | |
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
return encode( |
The goal is to package a server-side rendered Next.js app as SPA for capacitor.
Pages with dynamic routes/data use getServerSideProps(). For capacitor we need at least one page that can be rendered statically, preferably the index page.
When there are pages that use getServerSiedeProps()
we can't use next export
(it will fail with an error).
#21252B,#0B161E,#313843,#FFFFFF,#313843,#D6D6D6,#78AF8F,#78AF8F,#21252B,#A0AFB1 |
use git diff to generate file list
git diff --name-only master
add ext filter
#!/bin/bash | |
# A bash script to remove old versions of a Google App Engine instance. | |
# | |
# Inspiration of script taken from: | |
# https://almcc.me/blog/2017/05/04/removing-older-versions-on-google-app-engine/ | |
# Original code by Alastair McClelland and Marty Číž. | |
# Assembled and modified by Johan Niklasson. | |
# | |
# To run this script, execute |
{ | |
/* | |
// Place your snippets for JavaScript React here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"Print to console": { | |
"prefix": "log", | |
"body": [ |
export default class SampleClass { | |
getSomething() { | |
return 'something'; | |
} | |
} |
(Based on info from Peter Downs' gitub but with modified behavior to open a new terminal window for each invocation instead of reusing an already open window.)
The following three ways to launch an iTerm2 window from Finder have been tested on iTerm2 version 3+ running on macOS Mojave+.
pdanford - April 2020