Skip to content

Instantly share code, notes, and snippets.

private var passkeyRegistrationTask: Task<Void, Never>?
private var authClient: TurnkeyClient!
@objc private func handlePasskeyRegistrationCompleted(_ notification: Notification) {
guard let result = notification.userInfo?["result"] as? PasskeyRegistrationResult else {
return
}
guard let displayName = displayName else {
return
}
import AuthenticationServices
import Foundation
/// A response type that encapsulates the result of an authorization request
public enum ASAuthorizationResponse {
case registration(ASAuthorizationPlatformPublicKeyCredentialRegistration)
case assertion(ASAuthorizationPlatformPublicKeyCredentialAssertion)
}
/// A wrapper class around ASAuthorizationController that provides async/await functionality
//
// NSArray+CollectionOperations.h
// MSAppKit
//
// Created by Jarod Luebbert on 1/4/13.
//
//
#import <Foundation/Foundation.h>
"""
List all retina assets (@2x) that have odd dimensions.
------------------------------------------------------
"""
import os
from re import search
from PIL import Image
from argparse import ArgumentParser
def read_input(input_filename="input.txt"):
with open(input_filename) as f:
return (line.rstrip().split(' ') for line in f.readlines())
def scramble_word(word):
if len(word) > 3:
from random import shuffle
middle = list(word[1:-1])
shuffle(middle)
new_word = word[0] + str.join('', middle) + word[-1]
"""
Detecting cycles
----------
Solution for the cycles challenge.
"""
def read_input(input_filename="input.txt"):
with open(input_filename) as f:
return (line.rstrip().split() for line in f.readlines())
The longest length found was: 15
The first longest substring was: rustlingofeachp
python substring.py 28.60s user 27.93s system 99% cpu 56.831 total
#import <Foundation/Foundation.h>
@interface NSString (charactersAsArray)
- (NSArray *)charactersAsArray;
@end
@jarodl
jarodl / GFFParallaxNode.h
Created November 3, 2011 22:54 — forked from rolandoam/GFFParallaxNode.h
GFFParallaxNode
//
// GFFParallaxNode.h
//
// Created by Rolando Abarca on 12/14/09.
//
#import <Foundation/Foundation.h>
#import "cocos2d.h"
#define MAX_PARALLAX_CHILDREN 25
#!/usr/bin/env python
import os
from subprocess import call
SPRITESHEET_SRC_DIR='Resources/Spritesheet Sources'
SPRITESHEET_DST_DIR='Generated/Spritesheets'
TEXTURE_PACKER='Tools/TexturePacker.app/Contents/MacOS/TexturePacker'
def main():