Skip to content

Instantly share code, notes, and snippets.

View allancalix's full-sized avatar

Allan Calix allancalix

View GitHub Profile
@allancalix
allancalix / README.md
Created July 8, 2023 03:01
@bull-board adapter implementation for Elysia

This is a working example of an Elysia adapter which registers a bunch of routes on the Elysia app as well as statically serves files from the static assets.

Some things you might want to support if you use this:

  • setbasePath => other plugins use this to modify the relative base path of the routes registered
  • "@bull-board/api/dist/typings/app.js"; this import works but it's weird depending on the dist/ directory
#!/usr/bin/env bash
# By default, Mac saves screenshots to the user's desktop. This simple script
# sets the directory screenshots are saved to turns off the screenshot
# confirmation popup. This script only works on MacOS.
#
# Example:
# ./set-screenshot-dir.sh $HOME/Screenshots
set -e
#!/usr/bin/env node
// A simple script that checks for the existence of a "datelock" file. If one
// exists, either returns 1 (error) or 0 (success). I use this to periodically
// update files when a shell starts.
//
// Example usage:
// // Creates or overwrites a "datelock" file at LOCK_PATH.
// LOCK_PATH=$HOME/.datelock ./datelock.js write
// // Checks for a valid lock file at LOCK_PATH, returns 0 or 1.
// LOCK_PATH=$HOME/.datelock ./datelock.js