This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// A 30-minute hack to recreate the "iBeer" effect using SpriteKit, SwiftUI, and metaballs. | |
// The effect is created by having hundreds of physics-enabled balls in a SpriteKit scene, | |
// all drawing nothing. These balls are then read back out by SwiftUI in a TimelineView, and | |
// drawn using blur and alpha threshold filters to make them appear to be a liquid. | |
// The SpriteKit scene then has its gravity changed dynamically using the accelerometer, | |
// meaning that the "liquid" splashes around as you tilt your phone. | |
// | |
// Created by Paul Hudson | |
// https://www.hackingwithswift.com/license |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This playground shows you a few different ways to get device info via IOKit. | |
// If you want to explore IOKit and look for interesting data I would download | |
// the Additional Developer Tools from Apple and use the IORegistryExplorer app. | |
// It makes it super easy to poke around in the IOKit planes. | |
import IOKit | |
import Foundation | |
// For convient access we can make a computed getter for the PlatformExpert. | |
// Traditionally this has been where you go to find all sorts of data about the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// VisionViewPlaygroundApp.swift | |
// VisionViewPlayground | |
// | |
// Created by Steven Troughton-Smith on 21/09/2023. | |
// | |
import SwiftUI | |
@main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Recursivelly removes all apps from your Xcode archives from the LaunchServices database, preventing them from being used for widgets, launch at login, etc. | |
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -R -f -u $HOME/Library/Developer/Xcode/Archives |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"iOS": { | |
"iOS release": "01c1d682-6e8f-4908-b724-5501fe3f5e5c", | |
"iOS alternate": "c724cb61-e974-42d3-a911-ffd4dce11eda", | |
"iOS generic": "0c88076f-c292-4dad-95e7-304db9d29d34", | |
"iOS 11 developer beta": "b7580fda-59d3-43ae-9488-a81b825e3c73", | |
"iOS 11 AppleSeed beta": "f23050eb-bdfa-4b23-9eca-453e3b1a247c", | |
"iOS 11 public beta": "5839f7cf-9610-483a-980f-6c4266a22f17", | |
"iOS 12 developer beta": "ef473147-b8e7-4004-988e-0ae20e2532ef", | |
"iOS 12 public beta": "94bf0742-38e6-4379-adf9-ec9995dde586", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MacEditorTextView | |
* Copyright (c) Thiago Holanda 2020-2021 | |
* https://bsky.app/profile/tholanda.com | |
* | |
* (the twitter account is now deleted, please, do not try to reach me there) | |
* https://twitter.com/tholanda | |
* | |
* MIT license | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc) | |
hex=$((cat <<EOF | |
<?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"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PagingController.swift | |
// Paged scrolling for UITableView and UICollectionView | |
// Created by Christopher Fuller | |
// | |
// MIT License | |
// | |
// Copyright © 2018 Christopher Fuller | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on https://stackoverflow.com/a/23898449/266720 | |
void tallymarker_hextobin(const char * str, uint8_t * bytes, size_t blen) | |
{ | |
uint8_t pos; | |
uint8_t idx0; | |
uint8_t idx1; | |
// mapping of ASCII characters to hex values | |
const uint8_t hashmap[] = | |
{ |
NewerOlder