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| """ | |
| The most atomic way to train and inference a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
| #!/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] |
| """fix the creation date of some documents in paperless-ngx""" | |
| import datetime as dt | |
| from urllib.parse import urljoin | |
| import requests | |
| class Session(requests.Session): | |
| """https://stackoverflow.com/a/51026159/7410886""" |
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).
https://lmu.lge.com/ExternalService/lgscreenmanager/mac/FW/22MD4KA_MP7/FWLatestVersion.txt https://lmu.lge.com/ExternalService/lgscreenmanager/mac/FW/27MD5KA_MP4/FWLatestVersion.txt https://lmu.lge.com/ExternalService/lgscreenmanager/mac/FW/27MD5KL_TBT_PD/FWLatestVersion.txt https://lmu.lge.com/ExternalService/lgscreenmanager/mac/FW/24MD4KL_TBT_PD/FWLatestVersion.txt
https://lmu.lge.com/ExternalService/lgscreenmanager/mac/FW/22MD4KA_MP7/ https://lmu.lge.com/ExternalService/lgscreenmanager/mac/FW/27MD5KA_MP4/ https://lmu.lge.com/ExternalService/lgscreenmanager/mac/FW/27MD5KL_TBT_PD/ https://lmu.lge.com/ExternalService/lgscreenmanager/mac/FW/24MD4KL_TBT_PD/
| # 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" | |
| }, | |
| { |