Skip to content

Instantly share code, notes, and snippets.

View piemonte's full-sized avatar

patrick piemonte piemonte

View GitHub Profile
@piemonte
piemonte / CustomMetalContext.swift
Last active February 4, 2019 20:10
CustomMetalContext
//
// CustomMetalContext.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2016-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 / NextLevelARKitExample.swift
Last active May 2, 2019 18:17
NextLevel + ARKit Recording Example
//
// NextLevelARKitExample.swift
// NextLevel + ARKit Example
//
// The MIT License (MIT)
//
// Copyright (c) 2016-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
@piemonte
piemonte / NextLevelGLContext.swift
Created February 13, 2018 17:58
OpenGLES + SceneKit render context for planar frame buffers
//
// NextLevelGLContext.swift
// NextLevel
//
// Created by Patrick Piemonte on 9/26/16.
//
// The MIT License (MIT)
//
// Copyright (c) 2016-present patrick piemonte (http://patrickpiemonte.com/)
//
@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.
//
// 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
//
// 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
//
// 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
@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