Skip to content

Instantly share code, notes, and snippets.

Rolling up to the function like a stretched out Steve Ballmer

Nick Pannuto sneakyness

Rolling up to the function like a stretched out Steve Ballmer
View GitHub Profile
fruitcoder / CA+Extensions.swift
Last active Sep 17, 2021
Returns the simulator drag coefficient when Slow Animations are enabled, otherwise (and non simulator builds) 1.0
View CA+Extensions.swift
import UIKit
#if targetEnvironment(simulator)
@_silgen_name("UIAnimationDragCoefficient") func UIAnimationDragCoefficient() -> Float
func simulatorDragCoefficient() -> CFTimeInterval {
let drag = UIAnimationDragCoefficient()
if drag > 1 {
return CFTimeInterval(drag)
return 1
View boilerplate.swift
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI {
VStack {
Text("Hello, World")
douglashill / updateSafeAreaForKeyboardFromNotification.swift
Last active Feb 8, 2022
Avoid the keyboard by leveraging additionalSafeAreaInsets.
View updateSafeAreaForKeyboardFromNotification.swift
// Avoids the keyboard in a UIKit app by leveraging additionalSafeAreaInsets.
// You can put this in the root view controller so the whole app will avoid the keyboard.
// Only tested on iOS 13.3.
// Made for
@objc func updateSafeAreaForKeyboardFromNotification(_ notification: Notification) {
guard let endFrameInScreenCoords = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else {
// Please consider whether the force unwrap here is safe for your own use case.
View ProxyPropertyWrapper.swift
public struct AnyProxy<EnclosingSelf, Value> {
private let keyPath: ReferenceWritableKeyPath<EnclosingSelf, Value>
public init(_ keyPath: ReferenceWritableKeyPath<EnclosingSelf, Value>) {
self.keyPath = keyPath
@available(*, unavailable, message: "The wrapped value must be accessed from the enclosing instance property.")
public var wrappedValue: Value {
IanColdwater / twittermute.txt
Last active Oct 2, 2022
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
sorskoot / OBS RGB Glitch Shader.hlsl
Last active Jun 19, 2021
OBS RGB Glitch shader
View OBS RGB Glitch Shader.hlsl
uniform float speed;
uniform float stepsize;
uniform float amount;
float4 mainImage(VertData v_in) : TARGET
float time = elapsed_time*speed;
float glitch = 0;
if( frac(sin(time) * cos(v_in.uv.y*sin(time*1.45))) > amount) glitch=stepsize;
richellis /
Last active Sep 15, 2021 — forked from steverichey/
Create iOS application icons from one PDF file. Requires ImageMagick.
# Iconizer shell script by Steve Richey (
# Modified by Rich Ellis ( based on contributions on Github from crishoj, giria
# This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file.
# To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets
# Example: sh MyVectorGraphic.pdf MyXcodeProject
View Swift

Adding Method Cascades

  • Proposal: TBD
  • Author(s): Erica Sadun
  • Status: TBD
  • Review manager: TBD


Method cascades offer a method-based counterpart to functional chaining. In functional chaining, partial results pass from one step to the next. In cascades, object scope is maintained through a series of sequential calls. Both approaches support fluent interfaces, providing readable streamlined code.

elliottsj /
Last active May 30, 2016
My attempt at getting UIKit to work on watchOS 2
View free security

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?