Skip to content

Instantly share code, notes, and snippets.

@dlevi309
dlevi309 / profile_defaults.md
Last active March 30, 2024 11:30
An extensive list of settings written when installing a debugging profile from developer.apple.com

Digital Car Key:

Has three sections.

defaults: {
    “com.apple.MobileBluetooth.debug” =     {
        ExtraZoningLog =         {
            EnableZoneLogging = 1;
        };
        FWStreamLogging =         {
@hraban
hraban / README.md
Last active April 13, 2022 17:42 — forked from jamesmacfie/README.md
iTerm 2 - script to change theme depending on Mac OS dark mode
@varenc
varenc / Quickly look up a URL in the Wayback Machine in Chrome
Last active May 27, 2021 01:26
Chrome Wayback Machine search engine/bookmarklet. Accepts full URLs and works on Chrome's New Page window.
data:text/html,<script>location.href='https://web.archive.org/web/*/%s'</script>
@KoryNunn
KoryNunn / handshake-airdrop.md
Last active March 12, 2024 07:03
Handshake airdrop for github users.

Had 15 github followers in 2019? You can get about $4kAUD of crypto for minimal effort.

Explain this scam

That's legitimately a good default position to hold, however, in this case, the free money is a function of time, and not only charity.

In February 2020, in order to promote Handshake (HNS) to developers, an airdrop was offered to any Github user with more than 15 followers. The Airdrop would give you 4246HNS, at the time worth around at $0.08USD per coin, for a total of $339.68USD, pretty generous!

Today, 4246HNS is worth around $4000 dollarydoos, and there are plenty of github users who haven't claimed theirs.

enable
disable
startbackup
stopbackup
delete
restore
compare
setdestination
removedestination
destinationinfo
@varenc
varenc / dnsBypassTmp.sh
Last active October 22, 2023 11:50
Temporarily bypass PiHole or DNSCrypt-proxy dns resolver on Mac
#####
# Temporarily bypass your ad blocking DNS server with this shell function. Automatically restore settings after some number of minutes.
#####
# This `dnsBypassTmp` zsh function will temporarily bypass your PiHole or DNSCrypt-proxy resolver.
# If a site is broken because of a domain you've blocked, this makes it easily to temporarily enabled that and get things working again.
#
# The only argument is the number of minutes to enable the bypass. Defaults to 2 minutes.
# example:
# $ dnsBypassTmp 5
#
#!/bin/sh
brew_root="/usr/local/m1-homebrew"
brew_bin="$brew_root/bin"
sudo mkdir $brew_root
sudo chown $(whoami) $brew_root
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz -C $brew_root --strip 1
echo "export PATH=$brew_bin:\$PATH" >> ~/.zshrc
@lancethomps
lancethomps / close_notifications_applescript.js
Last active April 8, 2024 07:43
AppleScript to close all notifications on macOS Big Sur, Monterey, and Ventura
function run(input, parameters) {
const appNames = [];
const skipAppNames = [];
const verbose = true;
const scriptName = "close_notifications_applescript";
const CLEAR_ALL_ACTION = "Clear All";
const CLEAR_ALL_ACTION_TOP = "Clear";
@joevt
joevt / M1MacTimings.sh
Last active September 3, 2022 15:30
List the display timings on an M1 Mac
#!/bin/bash
# by joevt Jan 7/2021
dodump=1
if [[ "$1" == "-s" ]]; then
dodump=0
shift
fi
@roblogic
roblogic / zshexpn-explained.md
Created November 19, 2020 01:49
Regular Expressions in Zsh

The following is taken from a brilliant answer on unix.se. Posting it here for personal reference. The question was:

${var//pattern/replacement} is using zsh wildcard patterns for pattern, the same ones as used for filename generation aka globbing which are a superset of the sh wildcard patterns. The syntax is also affected by the kshglob and extendedglob options. The ${var//pattern/replacement} comes from the Korn shell initially.

I'd recommend enabling extendedglob (set -o extendedglob in your ~/.zshrc) which gives you the most features (more so than standard EREs) at the expense of some backward incompatibility in some corner cases.

You'll find it documented at info zsh 'filename generation'.