Tested on MacOS 11.6.4
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain $FILENAME.crt
bash firefox_enable_enterprise_roots_macos.sh
| <?php | |
| /* | |
| A simple PHP class to perform basic operations against Amazon S3 and compatible | |
| services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules. | |
| Copyright 2022 Marco Arment. Released under the MIT license: | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights |
| require "open-uri" | |
| r = -> { URI(_1).read } | |
| post_dates = r.("https://daringfireball.net/archive/") | |
| .scan(%r{<small>(.+?)</small>}) | |
| .map { |(x)| Date.parse(x.gsub(" ", " ")) } | |
| link_dates = r.("https://daringfireball.net/linked/") | |
| .scan(%r{href="(.+?/linked/20\d\d/.+?)"}) |
| #!/bin/zsh | |
| # set -x | |
| # Reference: https://dreness.com/blog/archives/155773 | |
| usage() { | |
| print "$1: Use histograms to explore os_log data. | |
| Usage: $1 [-k logKey] [-l logtime] [-h] [predicate] | |
| -k Calculate frequency of unique values of this log attribute. |
| javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{ | |
| default: Turndown | |
| }, { | |
| default: Readability | |
| }]) => { | |
| /* Optional vault name */ | |
| const vault = ""; | |
| /* Optional folder name such as "Clippings/" */ |
| import UIKit | |
| import Vision | |
| class ImageScanner: NSObject { | |
| struct ImageSlices { | |
| var registrationSlice: UIImage | |
| var operatorSlice: UIImage | |
| var flightSlice: UIImage | |
| var originSlice: UIImage | |
| var destinationSlice: UIImage |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| # Developed by Greg Miller, grmiller@ucdavis.edu | |
| # Version 3.05 | |
| # Last Updated April 13, 2020 | |
| # Tweaks by Dre on 8/18/2020 to fix bad assumptions about file paths | |
| # Purpose: To compile publicly-available CAISO system-wide electricity demand, supply, and emissions data into a csv file | |
| # Currently configured to coninue downloading data until the most recent data has been downloaded. | |
| # All directories and files will be created the first time you run the script | |
| # Run in unbuffered mode to make sure time.sleep() works: $ python -u |
| #!/bin/bash | |
| while :; do | |
| verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1) | |
| pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1) | |
| ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))") | |