Skip to content

Instantly share code, notes, and snippets.

@verityj
verityj / com.local.keyremap.plist
Last active June 17, 2023 19:41
Remap Magic Keyboard Eject key to forward delete (and right option to forward delete as backup)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.local.keyremap</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
<string>property</string>
@verityj
verityj / find-inside.sh
Last active June 21, 2023 11:21
Shell script: search in specified location for files containing a string inside (not case sensitive)
#!/bin/zsh
# Written by: VerityJ
# Published on: https://gist.github.com/verityj
#
# Usage: ./find-inside.sh location search-string
# location should not end in /*
# search-string does not need " or *
#
# Output: file names that contain the search-string inside
@verityj
verityj / find-here.sh
Last active June 21, 2023 11:22
Shell script: search in specified location for a file name string (not case sensitive) - do not show errors
#!/bin/zsh
# Written by: VerityJ
# Published on: https://gist.github.com/verityj
#
# Usage: ./find-here.sh location search-string
# search-string does not need " or *
if [ -z "$2" ]
then
@verityj
verityj / find-all.sh
Last active June 21, 2023 11:23
Shell script: search everywhere for a string (not case sensitive) - do not show errors
#!/bin/zsh
# Written by: VerityJ
# Published on: https://gist.github.com/verityj
#
# Usage: ./find-all.sh search-string
# search-string does not need " or *
if [ -z "$1" ]
then
/* ~/Library/KeyBindings/DefaultKeyBinding.dict
* Created by VerityJ
*/
{
"$\U007F" = "deleteForward:";
/* 'shift - delete' as forward delete - works in Xcode, not in Terminal */
"\UF708" = "deleteForward:";
@verityj
verityj / wifi-info.sh
Created June 12, 2023 17:05
T-Mobile home internet Arcadyan gateway hidden WiFi settings view
#!/bin/zsh
# curl -s hides the progress bar (verbose is -v)
# curl --progress-bar shows a simplier progress meter
# curl -S with silence activated still shows errors (or --show-error)
# Admin password between quotes:
admin="admin-password-here"
# First command:
@verityj
verityj / arcadyan-wifi-v2.py
Last active July 30, 2023 21:56
T-Mobile home internet Arcadyan gateway hidden WiFi settings edit v2 - text color added for emphasis
# This script is tested to work with T-Mobile home internet Arcadyan router.
# Tested on Mac OS 13 Ventura with python 3.9.6.
# Purpose:
# Display current wifi information.
# Choose to exit with no changes or enable/disable 2.4 GHz and 5.0 GHz wifi networks.
# This script needs router administrator password to run, type it into this file below.
# Usage (command line):
@verityj
verityj / arcadyan-wifi-v1.py
Created June 12, 2023 16:58
T-Mobile home internet Arcadyan gateway hidden WiFi settings edit v1
# This script is tested to work with T-Mobile home internet Arcadyan KVD21 gateway.
# Tested on Mac OS 13 Ventura with python 3.9.6.
# Purpose:
# Display current wifi information.
# Choose to exit with no changes or enable/disable 2.4 GHz and 5.0 GHz wifi networks.
# This script needs your Arcadyan administrator password to run, type it into this file below.
# Usage:
@verityj
verityj / mergechapters.py
Last active May 28, 2023 15:06 — forked from cliss/mergechapters.py
Merge Files with Chapters
# This script creates metadata and file list for unchapterized files.
#
# Usage: python3 <script>.py input.files
#
# Example:
# python3 <script>.py *.mp3
#
# Command used (to get duration in (s)):
# ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 input
#