Skip to content

Instantly share code, notes, and snippets.

View AlexanderBabel's full-sized avatar
🦇
Flying through the night

Alex Babel AlexanderBabel

🦇
Flying through the night
View GitHub Profile
@kmelve
kmelve / blurhash.js
Last active July 22, 2023 14:29
Retroactively add Blurhash strings to image assets in your Sanity Content Lake.
/**
* Retroactively add Blurhash strings to image assets in your Sanity Content Lake.
* 1. yarn add got sharp blurhash
* 2. run sanity exec blurhash --with-user-token
* 3. repeat (patches 100 assets in 1 transaction pr run)
*
* Some images might take a while to process.
*/
import client from 'part:@sanity/base/client'
import got from 'got'
#!/bin/bash
# Change the date under CUTOFF_DATE to change how far back you want to delete
# Install the GitHub CLI tool by following the instructions in the official documentation: https://cli.github.com/manual/installation
# Make sure you auth first to github with 'gh auth login'
REPO_OWNER="OWNER"
REPO_NAME="REPO_NAME"
CUTOFF_DATE=$(date --date='30 days ago' +'%Y-%m-%dT%H:%M:%SZ')
PAGE=1
@cyberpunk042
cyberpunk042 / debian12_configuration_script.sh
Last active July 17, 2025 17:06
TrueNAS Scale 24.04.2 Customization
#!/bin/bash
# Set script to exit on error
set -e
# Enable logging
exec > >(tee -i /var/log/setup-script.log)
exec 2>&1
echo "Starting script execution..."