Skip to content

Instantly share code, notes, and snippets.

@chockenberry
chockenberry / PrivacyInfo.xcprivacy
Last active March 27, 2024 19:27
PrivacyInfo.xcprivacy sample
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
@jsoncow
jsoncow / unsupported.csv
Created November 5, 2023 13:26
Unsupported AWS Service Quotas
ServiceCode ServiceName QuotaCode QuotaName
AWSCloudMap AWS Cloud Map L-D95E8A57 Instances per namespace
AWSCloudMap AWS Cloud Map L-2DA90E5C Instances per service
AWSCloudMap AWS Cloud Map L-D589BB26 Custom attributes per instance
account AWS Account Management L-E37B66F4 Number of concurrent region-opt requests per account
account AWS Account Management L-33A0F311 Number of concurrent region-opt requests per organization
acm AWS Certificate Manager (ACM) L-DA1D8B98 ACM certificates created in last 365 days
acm AWS Certificate Manager (ACM) L-D2CB7DE9 Imported certificates
acm AWS Certificate Manager (ACM) L-FB94F0B0 Domain names per ACM certificate
acm AWS Certificate Manager (ACM) L-F141DD1D ACM certificates
@MarcoEidinger
MarcoEidinger / findRequiredReasonAPIUsage.sh
Created August 21, 2023 19:55
A shell script to find if any "required reason API" are used in Swift or Objective-C files within that folder or subfolders
#!/bin/bash
# https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
searchTerms=(
# File timestamp APIs
"creationDate"
"modificationDate"
"fileModificationDate"
"contentModificationDateKey"
"creationDateKey"

Ancient Infrastructure

The community still has access to some sort of functioning ancient infrastructure, whether it's an array of wall-mounted arcane energy projectors, running water, moving roadways, community-wide climate control, or some other inherited luxury. This infrastructure may be the result of a still-functional Working, or it could be the product of some venerable occult engine that's still operational, or it may be the fruit of the labors of some specially-designed organism or Blighted populace. E Abusive ruler overusing the infrastructure, Foreign agent seeking to cause havoc, Reckless sorcerer seeking to steal its power F Harried chief of the maintainers, Fascinated foreign scholar, Merchant reliant on its use C

import random
from statistics import mean
from statistics import median
from statistics import mode
from statistics import stdev
import seaborn as sns
import matplotlib.pyplot as plt
# this function is not really necessary,
# but it makes the gameplay loop easier to read
@kfox
kfox / README.md
Last active December 4, 2023 11:08
TCP echo server for Node.js

TCP echo server for Node.js

Usage

  1. Make sure you have a modern-ish version of Node.js installed.
  2. Type npx https://gist.github.com/kfox/1280c2f0ee8324067dba15300e0f2fd3
  3. Connect to it from a client, e.g. netcat or similar: nc localhost 9000
@hwayne
hwayne / circuit.als
Created February 6, 2023 21:53
Simple example of alloy synthesis
enum Val {On, Off}
sig P {} //"Permutation"
abstract sig Input {
val: Val one -> P
}
sig Source extends Input {}
abstract sig Gate extends Input {
@mauvehed
mauvehed / enable_to_sudo_authenticate_with_touch_id.sh
Last active January 27, 2023 23:35
Enable sudo auth for macOS touchID via pam
#!/bin/bash
#
# credit to machupicchubeta/dotfiles/bin/enable_to_sudo_authenticate_with_touch_id.sh
set -eu
set -o pipefail
sudo chmod +w /etc/pam.d/sudo
if ! grep -Eq '^auth\s.*\spam_tid\.so$' /etc/pam.d/sudo; then
( set -e; set -o pipefail
# Add "pam_tid.so" to a first authentication
@berkus
berkus / pijularize.sh
Created January 21, 2022 08:18
Pijularize a Git repository with all branches
#!/bin/sh
set -e
set -x
reponame=`basename $(pwd)`
echo "#######################################################################################"
echo "# Script to import all local branches from current repository (${reponame}) into pijul"
echo "# Will create a bunch of temp repos for import, so have sufficient disk space"
echo "#######################################################################################"

Repackaging a Fat Static Library as an xcframework

Consider this directory tree from a vendor:

OwningTheLibs/
  OwningTheLibs.a
  include/
    OwningTheLibs/
      OwningTheLibs.h