Skip to content

Instantly share code, notes, and snippets.

@isao
isao / lisp.js
Created March 27, 2025 01:22 — forked from intercaetera/lisp.js
Lisp in JS
const symbols = [
// special forms
'lambda', 'when', 'rec', 'define',
// standard library
'inc', 'dec', 'add', 'mul', 'eq', 'head', 'tail', 'cons', 'list', 'isNil',
// variables
'a', 'b', 'c', 'k', 'l', 'm', 'n', 'x', 'y', 'z',
'as', 'xs',
'fn', 'double', 'map',
]
@isao
isao / intensify.sh
Created March 14, 2025 23:33 — forked from alisdair/intensify.sh
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking
@isao
isao / moreFinderTerminal.sh
Created September 21, 2024 20:40 — forked from ldavidh/moreFinderTerminal.sh
alternate sel script
#cd into directory in Finder's front window
function cdf() {
finderPath=`osascript -e 'try
tell application "Finder" to set the source_folder to (folder of the front window) as alias
on error
tell application "Finder" to set source_folder to insertion location as alias
end try
return POSIX path of source_folder as string'`
cd "$finderPath"
@isao
isao / gist:c49910951638d15175fa6086fe841aea
Created April 12, 2024 00:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@isao
isao / Web Component for Copyright Years.md
Created March 29, 2024 17:58
Web Component for Copyright Years
@isao
isao / DOM3D.js
Created March 27, 2024 15:57 — forked from OrionReed/dom3d.js
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // Β―\\_(ツ)_/Β―
@isao
isao / list_launchd_notifications.sh
Created March 19, 2024 17:51 — forked from dreness/list_launchd_notifications.sh
LaunchEvents -> com.apple.notifyd.matching
find /System/Library/LaunchDaemons /System/Library/LaunchAgents -name "*.plist" \
| while read p ; do plutil -convert json -o - ${p} \
| jq -r ' .. | objects | with_entries(select(.key == "Notification")) | select(. != {}).Notification'
done | sort -u > ~/Desktop/all-launchd-notifications.txt

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@isao
isao / BBEdit LSP with Volta.md
Created January 6, 2023 23:11
BBEdit LSP with Volta
@isao
isao / Extract_URL_from_webloc.md
Created September 30, 2022 16:05 — forked from ChristopherA/Extract_URL_from_webloc.md
Extract URL from Safari .webloc

Extract URL from Safari .webloc

bash one-liner

plutil -p example.webloc | sed -En 's/.*"(.*)"$/\1/p'

Convert all .webloc files in directory to .url files

webloc2url.sh - Converts .webloc (Mac) to .url (Windows) files.