Skip to content

Instantly share code, notes, and snippets.

@piemonte
piemonte / macOS Internals.md
Created May 7, 2023 06:08 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@piemonte
piemonte / DirectionView
Created April 14, 2023 03:57
example for using the Position library bearing utility functions
//
// DirectionView.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2020-present patrick piemonte (http://patrickpiemonte.com/)
//
// 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
@piemonte
piemonte / LibraryStorage.sol
Created January 23, 2023 22:46 — forked from xtremetom/LibraryStorage.sol
Dirty library storage example
pragma solidity ^0.8.9;
import {SSTORE2} from "sstore2/SSTORE2.sol";
import {DynamicBuffer} from "ethier/contracts/utils/DynamicBuffer.sol";
contract LibraryStorage {
struct Library {
address owner;
bytes details;
//
// CLLocation+H3.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2020-present patrick piemonte (http://patrickpiemonte.com/)
//
// 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
//
// RGBCube.swift
//
// Created by patrick piemonte on 5/14/18.
//
// The MIT License (MIT)
//
// Copyright (c) 2015-present patrick piemonte (http://patrickpiemonte.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
//
// UIApplication+AppIcon.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2020-present patrick piemonte (http://patrickpiemonte.com/)
//
// 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
//
// MKMapView+Additions.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2015-present patrick piemonte (http://patrickpiemonte.com/)
//
// 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
//
// UIImage+GIF.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2015-present patrick piemonte (http://patrickpiemonte.com/)
//
// 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
//
// Foundation+TimeAgo.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2015-present patrick piemonte (http://patrickpiemonte.com/)
//
// 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
@piemonte
piemonte / tiny-83-mint-helper.md
Created November 2, 2021 00:26 — forked from 0xOlias/tiny-83-mint-helper.md
TINY-83 mint helper
  1. Go to https://tiny-83.github.io/tiny-83
  2. Change the min and max fields as shown below:
xMin = 0
xMax = 22
yMin = -1
yMax = 14
  1. Copy this code, type 1 where you want to draw a pixel, then paste the result into the y = text field on the website.