Skip to content

Instantly share code, notes, and snippets.

View alexg0's full-sized avatar

Alexander Goldstein alexg0

  • Eligo Energy, LLC
  • Miami, FL
View GitHub Profile
@sj26
sj26 / LICENSE.md
Last active April 7, 2025 21:12
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@sulami
sulami / dc.sh
Last active August 14, 2021 17:43
Alfred dc RPN Calculator Workflow Script
query=$1
result=$( dc -e "$query pq" 2>&1 | tr -d '\\' | head -1 )
echo '{"items": ['
echo '{"title":'
echo "\"${result}\""
echo ','
echo '"subtitle": "Copy result to clipboard",'
echo '"arg":'
@getaaron
getaaron / macos-messages-subject-field.md
Last active March 10, 2025 11:17
Enable iMessage (Messages) Subject Field in macOS Big Sur through Sonoma

Want the Subject field (for bold iMessages) in macOS’ Messages app?

  1. Quit Messages
  2. Open Terminal
  3. Run defaults write com.apple.MobileSMS MMSShowSubject 1
  4. Start Messages

This worked for me on a fresh install of macOS 14.1.1 (23B81) (new Mac mini).

@carlosonunez
carlosonunez / auto_sudo_via_watch_and_tid.sh
Last active March 2, 2021 22:00
Enable support for sudo via Apple Watch and Touch ID
APPLE_WATCH_PAMID_LIBPATH=/usr/local/lib/pam/pam_watchid.so.2
APPLE_WATCH_PAMID_URL=https://github.com/biscuitehh/pam-watchid
APPLE_WATCH_PAMID_PATH=$HOME/src/pamid-applewatch
enable_sudo_with_apple_watch_and_touch_id() {
trap 'popd' EXIT INT HUP
enable_apple_watch() {
if ! test -f $APPLE_WATCH_PAMID_LIBPATH
then
if ! test -d $APPLE_WATCH_PAMID_PATH
@craigjperry2
craigjperry2 / Browser Extension Example
Last active September 19, 2021 14:22
Simple Example of Augmenting a Vendor App with a Browser Extension
Simple example of a browser extension to augment a vendor web-app for a poster on HN.
@vladget
vladget / gist:1de9aa3f10fe20638cd61356064738fb
Created September 6, 2022 18:41
Mikrotik dual-wan failover with both private DHCP WANs
# sep/04/2022 17:59:15 by RouterOS 6.49.6
/interface bridge
add name=bridge
/interface ethernet
set [ find default-name=ether1 ] name=ether1-wan1
set [ find default-name=ether2 ] name=ether2-wan2
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
set [ find default-name=wlan2 ] ssid=MikroTik
/interface list
@firexcy
firexcy / readme.md
Last active March 18, 2025 09:05
DIY a Rewind.ai

This Gist provides a solution to periodically capture screenshots of your Mac, and create therefrom a searchable PDF archive so that you can always get an answer to the “what, when, and where” questions about your usages.

To use these scripts:

  1. Download the shell script rewind, then:
    1. put it under ~/bin (or other fixed path you prefer);
    2. execute