start new:
tmux
start new with session name:
tmux new -s myname
/** | |
* Returns PBKDF2 derived key from supplied password. | |
* | |
* Stored key can subsequently be used to verify that a password matches the original password used | |
* to derive the key, using pbkdf2Verify(). | |
* | |
* @param {String} password - Password to be hashed using key derivation function. | |
* @param {Number} [iterations=1e6] - Number of iterations of HMAC function to apply. | |
* @returns {String} Derived key as base64 string. | |
* |
#!/usr/bin/env python | |
""" | |
This file is part of "blighty" which is released under GPL. | |
See file LICENCE or go to http://www.gnu.org/licenses/ for full license | |
details. | |
blighty is a desktop widget creation and management library for Python 3. |
export ZSH="/Users/karlhadwen/.oh-my-zsh" | |
export PATH=${PATH}:/usr/local/mysql/bin/ | |
ZSH_THEME="robbyrussell" | |
ZSH_DISABLE_COMPFIX=true | |
plugins=( | |
git | |
zsh-autosuggestions | |
last-working-dir |
import { Client } from 'postgres' | |
import { CompiledQuery, DatabaseConnection, Driver, QueryResult, TransactionSettings } from 'kysely' | |
type QueryArguments = unknown[] | Record<string, unknown> | |
export class PostgresDriver implements Driver { | |
readonly #connectionMutex = new ConnectionMutex() |
Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.
You use Next.js router like normally, but don't define getStaticProps
and such. Instead you do client-only fetching with swr
, react-query
, or similar methods.
You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)
Don't like Next? Here's how to do the same in Gatsby.