This script extracts icons from MacOS applications and system resources, then converts them to a specific JSON format with Base64-encoded images.
# Just run a script with default settings
uv run flexbar_macos_icon_extractor.py| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "httpx>=0.28.1", | |
| # "python-decouple>=3.8", | |
| # "sh>=2.2.2", | |
| # ] | |
| # [tool.uv] |
I need to use GlobalProtect because it's becoming the only VPN to access resources in my school. The VPN client is simple enough, but it does two annoying things:
Here I'll show you how I fixed both issues in macOS 12.2 (Monterey).
| # Stick this in your home directory and point your Global Git config at it by running: | |
| # | |
| # $ git config --global core.attributesfile ~/.gitattributes | |
| # | |
| # See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
| *.c diff=cpp | |
| *.h diff=cpp | |
| *.c++ diff=cpp | |
| *.h++ diff=cpp |
| [ | |
| { | |
| "code": "us-east-1", | |
| "region": "US East", | |
| "city": "Virginia", | |
| "lat": 38.9940541, | |
| "long": -77.4524237, | |
| "country": "US" | |
| }, | |
| { |
| Rank | Type | Prefix/Suffix | Length | |
|---|---|---|---|---|
| 1 | Prefix | my+ | 2 | |
| 2 | Suffix | +online | 6 | |
| 3 | Prefix | the+ | 3 | |
| 4 | Suffix | +web | 3 | |
| 5 | Suffix | +media | 5 | |
| 6 | Prefix | web+ | 3 | |
| 7 | Suffix | +world | 5 | |
| 8 | Suffix | +net | 3 | |
| 9 | Prefix | go+ | 2 |
| # Infrafloss, a fairyfloss for the infra among us | |
| # Intended for use with nopjmp's fairyfloss VS Code extention | |
| # VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=nopjmp.fairyfloss | |
| # Copy this file into your settings.json | |
| "workbench.colorTheme": "fairyfloss", | |
| "editor.tokenColorCustomizations": | |
| { | |
| "textMateRules": | |
| [ |
| C:\Users\pasta\AppData\Local\Android\Sdk\platform-tools\adb.exe forward tcp:9222 localabstract:chrome_devtools_remote | |
| wget -O tabs.json http://localhost:9222/json/list | |
| REM ruby -e "require 'json'; puts JSON.load(File.read('tabs.json')).map{|e| %W{<a href='#{e['url']}'> #{e['title']}</a><br/>} }" | Set-Clipboard -AsHtml | |
| ruby -e "require 'json'; puts JSON.load(File.read('tabs.json')).map{|e| %W{#{e['title']}\t#{e['url']}} }" | Set-Clipboard |