Skip to content

Instantly share code, notes, and snippets.

View cunneen's full-sized avatar

Mike Cunneen cunneen

  • Perth, Australia
View GitHub Profile
@cunneen
cunneen / install_windsurf_vscode.sh
Created August 31, 2026 14:50
Install discontinued VSCode Windsurf (Codeium) Extension
#!/usr/bin/env bash
#
# Installs (discontinued) VSCode "windsurf" extension, "codeium.codeium", version 1.49.2 , from 16 June 2025
#
# The vsix extension has been archived at:
# - https://web.archive.org/web/20260831095635/https://codeium.gallery.vsassets.io/_apis/public/gallery/publisher/codeium/extension/codeium/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
#
# Note: Language server downloads have also been archived at:
# - https://web.archive.org/web/20260831132044/https://releases.codeiumdata.com/language-server-v1.48.2/language_server_macos_x64.gz
# - https://web.archive.org/web/20260831131840/https://releases.codeiumdata.com/language-server-v1.48.2/language_server_macos_arm.gz
@cunneen
cunneen / pangolin-dns-clear.sh
Last active August 17, 2026 11:46
Pangolin Clear DNS settings on Mac
#!/usr/bin/env bash
# This script is a workaround for the issue where pangolin client is disconnected when the macbook goes to sleep.
# The issue is described at https://github.com/fosrl/apple/issues/58
#
# Usage: sudo pangolin-dns-clear.sh
# -- configuration --
# This is the DNS server that pangolin uses to resolve the domain names of the pangolin resources.
PANGOLIN_DNS_SERVER="100.96.128.1"
LOG_LEVEL=INFO # DEBUG, INFO, ERROR, or NONE
@cunneen
cunneen / JSDoc Object Property Name Restrictions and Value Restrictions.js
Last active October 28, 2025 06:56
JSDoc: restricting key names and allowable values in VSCode
/*
* Defining restrictions on allowable property names is easy in typescript; in JSDoc, not so much.
*
* Here's what I found works with javascript/JSDoc, so far as working fully with IntelliSense in VSCode.
* The secret sauce is:
*
* \@typedef {{[S in LogLevelName]: LogFunction}} LoggerObject
*/
/**
@cunneen
cunneen / reverseip.sh
Last active February 18, 2026 13:40
Bash function to reverse-lookup domain names for an IP Address via robtex.com
# WARNING: this is brittle as hell. It will break when robtex changes their website.
#
# reverseip
# A shell function to get a list of domain names associated with the given IP address, using Robtex.com
#
# Parameters:
# IP - IP address to reverse lookup
#
# Returns:
# List of domain names associated with the IP address
@cunneen
cunneen / copyCookies.js
Last active February 13, 2025 08:03
Export a website's cookies as JSON
window.confirm("Copy Cookies?") &&
(() => {
// modal (popup) div
const div = document.createElement("div");
div.setAttribute("style", "margin: auto; width: 25%; min-height: 25%; position: absolute; top: 25%; bottom: 25%; left: 25%; right: 25%; background-color: #ffe; padding: 1em; z-index:99999; border: 2px solid blue; border-radius: 1em; box-shadow: 4px 4px 8px #aaa;");
// document.cookies keys and values as JSON text
const cookiesJSONText = JSON.stringify(
Object.fromEntries(
document.cookie.split(/; ?/)
@cunneen
cunneen / icons
Created January 8, 2025 07:14 — forked from brutella/icons
Generate iOS, watchOS, and macOS app icons from one image
#! /bin/sh
function print_example() {
echo "Example"
echo " icons ios ~/AppIcon.pdf ~/Icons/"
}
function print_usage() {
echo "Usage"
echo " icons <ios|watch|complication|macos> in-file.pdf (out-dir)"
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cunneen
cunneen / keybase.md
Created June 30, 2023 04:08
keybase.md

Keybase proof

I hereby claim:

  • I am cunneen on github.
  • I am cunneen (https://keybase.io/cunneen) on keybase.
  • I have a public key ASD2B9N4HIcB5mADJrgE9B3tBOEuBAdXxUo_0pjDUWo2UQo

To claim this, I am signing this object:

@cunneen
cunneen / machine.js
Created June 23, 2021 03:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cunneen
cunneen / machine.js
Last active June 15, 2021 14:42
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions