built-in help:
communicator --help
#! /usr/bin/env python3 | |
# This script is explained here: <https://sixcolors.com/post/2024/10/putting-my-solar-system-in-my-menu-bar/> | |
# Adapted from [email protected] <https://github.com/grzegorz914/homebridge-enphase-envoy> | |
# <xbar.title>Enphase Solar (Averages)</bitbar.title> | |
# <xbar.version>v1.2</xbar.version> | |
# <xbar.author>Jason Snell</xbar.author> | |
# <xbar.author.github>jasonsnell</xbar.author.github> | |
# <xbar.desc>Display local Enphase solar stats.</xbar.desc> |
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
(* | |
Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window) | |
Much more elegant version: Leon Cowle (https://github.com/leoncowle) | |
Even more elegant version: https://stackoverflow.com/questions/54066100/applescript-to-split-safari-tabs-into-new-window/54089865#54089865 | |
Worth a warning: "moving" tabs with this script doesn't actually move them like | |
drag-and-drop does. The tabs "moved" by this script will reload in the new window, |
#!/usr/bin/env bash | |
# many settings from https://raw.githubusercontent.com/mathiasbynens/dotfiles/master/.macos | |
# many settings from https://raw.githubusercontent.com/thoughtbot/laptop/master/mac | |
# instructions on finding the default you've changed: https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/ | |
# previous install notes at: | |
# https://gist.github.com/llimllib/ee591266e05bd880629a4e7511a61bb3 | |
# https://gist.github.com/llimllib/e864a92da94ceb1ef0da2e06fd1f8d70 | |
# https://gist.github.com/llimllib/aa4420cac617774ee2a54d8603d862e4 | |
fancy_echo() { |
This guide was adapted from https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278#running-ubuntu-server-for-arm64
#!/usr/bin/env python3 | |
# # This python script provides a function to query the pfsense (+v2.4) dhcp leases status page and return a list of tuples including | |
# ip, hostname, and mac address. To use, ensure LXML is installed via package manager or via pip. | |
# | |
# 16-Dec-2016 - Original release | |
# 3-Sep-2020 - Minor update to match formatting of leases page in latest pfSense version (2.4.5). | |
# 9-Sep-2020 - Backported improvements to handle table rows with missing data, use global variables for user/pass/server_ip, | |
# and return list from scrape function as implemented by fryguy04 in fork here: | |
# https://gist.github.com/fryguy04/7d12b789260c47c571f42e5bc733a813 |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
import objc | |
from Foundation import NSBundle | |
# Predefine some opaque types | |
DASessionRef = objc.createOpaquePointerType('DASessionRef', b'^{__DASession=}', None) | |
DADiskRef = objc.createOpaquePointerType('DADiskRef', b'^{__DADisk=}', None) | |
# Load DiskManagement framework classes | |
DiskManagment = objc.loadBundle('DiskManagment', globals(), bundle_path='/System/Library/PrivateFrameworks/DiskManagement.framework') |
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'
The only information that aren't fetched are:
%B
: raw body (unwrapped subject and body)%GG
: raw verification message from GPG for a signed commit# This goes in .git/info | |
*.ipynb filter=dropoutput_ipynb |