Skip to content

Instantly share code, notes, and snippets.

@aydenp
aydenp / redirect.html
Last active December 16, 2022 13:11
bypass twitter blocking mastodon links by meta redirect
<!-- elon hasn't heard of meta refresh yet -->
<meta http-equiv="refresh" content="0; url=https://hachyderm.io/@ayden">
@aydenp
aydenp / URLSession+LinuxAsync.5.6.swift
Last active May 13, 2024 14:17
Port URLSession's convenience async methods to Linux
//
// URLSession+LinuxAsync.swift
//
// Created by Ayden Panhuyzen on 2022-11-27.
//
#if canImport(FoundationNetworking)
import Foundation
import FoundationNetworking
@aydenp
aydenp / currency.ayden.tech.md
Last active November 27, 2022 17:43
currency.ayden.tech API spec

Keybase proof

I hereby claim:

  • I am aydenp on github.
  • I am aydenp (https://keybase.io/aydenp) on keybase.
  • I have a public key ASCMZCGttsHq-6gFwDvtGwNsbIlEXN1KYtvSqdd4SKADcwo

To claim this, I am signing this object:

@aydenp
aydenp / OBWelcomeControllerExample.m
Last active May 1, 2021 12:55 — forked from chrisharper22/OBWelcomeControllerExample.m
Creating a custom OBWelcomeController in iOS 13
//
// How to use an OBWelcomeController in your project.
//
// Simalary (Chris)
//
// All the important interfaces
@interface OBButtonTray : UIView
- (void)addButton:(UIButton *)button;
@aydenp
aydenp / UIBackgroundStyle-Test.entitlements
Last active September 19, 2021 21:46 — forked from AppleBetas/gist:4ddf91c8ead4b2a87a71bcd52eab258b
Non-opaque application windows in iOS 7, with optional blur. Shows the user's wallpaper under the app, with Parallax if supported.
<?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>com.apple.springboard.appbackgroundstyle</key>
<true/>
</dict>
</plist>
@aydenp
aydenp / NSAssertionHandler+BeGone.m
Last active December 23, 2019 04:39
leave me alone!
//
// NSAssertionHandler+Goodbye.m
// please only ever use this for patching out apple checks, never in prod
//
// Created by Ayden Panhuyzen on 2019-12-20.
// Copyright © 2019 Ayden Panhuyzen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
@aydenp
aydenp / remove-twitter-photos.js
Created December 2, 2019 02:24
Remove profile photo and banner from twitter (since there's no longer a UI for removing profile photo)
const Twitter = require('twitter');
// fill in:
var client = new Twitter({
consumer_key: '',
consumer_secret: '',
access_token_key: '',
access_token_secret: ''
});
@aydenp
aydenp / fun.js
Last active November 29, 2019 04:00
slowly descend into Cyrillic with some terrible code
const translit = require('latin-to-cyrillic')
const text = `According to all known laws of aviation, there is no way a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway because bees don't care what humans think is impossible. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let's shake it up a little. Barry! Breakfast is ready! Ooming! Hang on a second. Hello? - Barry? - Adam? - Oan you believe this is happening? - I can't. I'll pick you up. Looking sharp. Use the stairs. Your father paid good money for those. Sorry. I'm excited. Here's the graduate. We're very proud of you, son. A perfect report card, all B's. Very proud. Ma! I got a thing going here. - You got lint on your fuzz. - Ow! That's me! - Wave to us! We'll be in row 118,000. - Bye! Barry, I told you, stop flying in the house! - Hey, Adam. - Hey, Barry. - Is that fuzz gel? - A little. Special day, graduation. Never thought I'd make it. Th
@aydenp
aydenp / UIColor+RGBA.swift
Created April 23, 2018 15:21
Easily get RGB, HSL, white, and alpha information, whether a colour is light in Swift. Also can transition between two colours using the float you provide and tell you if a provided colour is lighter or darker.
//
// UIColor+RGBA.swift
//
// Created by Ayden Panhuyzen on 2018-04-10.
// Copyright © 2018 Ayden Panhuyzen. All rights reserved.
// https://gist.github.com/aydenp
//
import UIKit