Skip to content

Instantly share code, notes, and snippets.

@varenc
varenc / README.md
Last active December 4, 2021 22:03 — forked from Jahhein/README.md
Display Apple AirPods battery levels via Terminal
@varenc
varenc / launchctl_man_pages.md
Created January 6, 2022 00:49 — forked from dmattera/launchctl_man_pages.md
macOS man page entries for launchctl services

This list was auto-generated on macOS 10.15 (Catalina) using a script that did the following:

  1. grabbed the name of all the .plist files located in the 5 folders used by launchctl:
  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System wide daemons provided by the administrator.
  • /System/Library/LaunchAgents OS X Per-user agents.
  • /System/Library/LaunchDaemons OS X System wide daemons.
@varenc
varenc / profile_defaults.md
Created May 6, 2022 01:37 — forked from dlevi309/profile_defaults.md
An extensive list of settings written when installing a debugging profile from developer.apple.com

MediaPlayer logging:

defaults: {
    "com.apple.homesharing" =     {
        HSConsoleLoggingLevel = 7;
        HSLogFileLoggingLevel = 7;
        HSLogging = 1;
    };
    "com.apple.medialibrary" =     {
@varenc
varenc / zshexpn-explained.md
Created November 26, 2022 02:01 — forked from roblogic/zshexpn-explained.md
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'.

@varenc
varenc / get_gists.py
Last active June 14, 2023 20:29 — forked from selimslab/get_gists.py
Download all gists of a user
#!/usr/bin/env python3
import sys
from subprocess import call
import json
import os
import requests
import shutil
import colorama