Skip to content

Instantly share code, notes, and snippets.

@chockenberry
chockenberry / PrivacyInfo.xcprivacy
Last active April 19, 2024 18:39
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>

Rusty's API Design Manifesto

The idea

Application Programming Interface (API) design is hard. But it's even harder to change once you get it wrong. So what you should do is to spend the effort to get it right the first time around.

In the Linux Kernel community Rusty Russell came up with a API rating scheme to help us determine if our API is sensible, or not. It's a rating from -10 to 10, where 10 is perfect is -10 is hell. Unfortunately there are too many examples at the wrong end of the scale.

Rusty's original descriptions

@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 May 18, 2024 20:36
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
@ignamiranda
ignamiranda / Ironsworn Assets.md
Last active May 4, 2024 23:53
All the Ironsworn assets in screen-readable Markdown format

Ironsworn Assets

Here are all the Ironsworn assets in Markdown format for those who read from a screen or prefer to keep their character information in a text document. I've included the 3 New Official-ish Assets created by Shawn Tomkin that aren't in the main Ironsworn PDF.

License:

This work is based on Ironsworn (found at www.ironswornrpg.com), created by Shawn Tomkin, and licensed for our use under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license (creativecommons.org/licenses/by-nc-sa/4.0/).

Table of Contents