| title | publishedOn | description |
|---|---|---|
Hello World |
2022-05-15 |
T3st1ng G1thub G15t5 as CeeDee En |
$$ L = \frac{1}{2} \rho v^2 S C_L
| { | |
| // font stuff | |
| "editor.fontFamily": "JetBrains Mono", | |
| "editor.fontSize": 14, | |
| "editor.fontLigatures": true, | |
| // theme stuff | |
| "workbench.colorTheme": "Tokyo Night", | |
| "editor.bracketPairColorization.enabled": true, | |
| "workbench.colorCustomizations": { |
| type NewLinkTagStatus = 'ALREADY_EXISTS' | 'CREATED' | 'ERROR' | |
| type NewLinkTagArgs = Pick<HTMLLinkElement, 'href' | 'rel' | 'type'> & Partial<HTMLLinkElement> | |
| export function newLinkTag(attributes: NewLinkTagArgs): NewLinkTagStatus { | |
| // these two attributes are required | |
| const { href, rel } = attributes | |
| if (!href || !rel) { | |
| console.error('newLinkTag: href and rel are required attributes') | |
| return 'ERROR' | |
| } |
| import { NextResponse, type NextRequest } from "next/server"; | |
| import { getToken } from "next-auth/jwt"; | |
| export const config = { matcher: "/", runtime: "experimental-edge" }; | |
| /** | |
| * This middleware ensures auth on all routes. | |
| * The file should be placed in the root directory of the project. | |
| * E.g., /middleware.ts, or /src/middleware.ts | |
| * |
| pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U |
| #!/bin/sh - | |
| # USAGE: sh vercel-deploy-env.sh <filename> <environment> | |
| # EXAMPLE: sh vercel-deploy-env.sh .env production | |
| while IFS== read -r name value | |
| do | |
| echo "$value" | vercel env add "$name" "$2" | |
| done < "$1" |
| #!/bin/sh | |
| # Run with: bash docker-delete-everything.sh | |
| # Stop all containers | |
| docker stop $(docker ps --all --quiet) | |
| # Delete all containers | |
| docker rm $(docker ps --all --quiet) |
Install GnuPG and GitHub official CLI tool. Instructions:
| #!/usr/bin/env ts-node | |
| import fs from "node:fs/promises"; | |
| import tinify from "tinify"; | |
| /** | |
| * This script will travel through the public folder and its subdirectories and | |
| * compress all images with tinify. It will also convert all images to webp. | |
| * then it will delete the original images. | |
| * | |
| * You can run this with ts-node: |
// suppress-node-warnings.cjs
// inspired by
// https://github.com/nodejs/node/issues/30810#issuecomment-1383184769
const { emit: originalEmit } = process;
function suppresser(event, error) {
return event === 'warning' && error.name === 'ExperimentalWarning'
? false