- Open directory in Finder with Cmd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
-
Open
IDETextKeyBindingSet.plistwith a text editor. -
Add this in:
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
Open IDETextKeyBindingSet.plist with a text editor.
Add this in:
| // bezier curve with 2 control points | |
| // A is the starting point, B, C are the control points, D is the destination | |
| // t from 0 ~ 1 | |
| vec3 bezier(vec3 A, vec3 B, vec3 C, vec3 D, float t) { | |
| vec3 E = mix(A, B, t); | |
| vec3 F = mix(B, C, t); | |
| vec3 G = mix(C, D, t); | |
| vec3 H = mix(E, F, t); | |
| vec3 I = mix(F, G, t); |
| // Fixes PresentationLink so that a modal can be opened multiple times. | |
| // | |
| // Also adds .isModalInPresentation(_ value: Bool) modifier to control | |
| // if the modal can be closed or not. | |
| // | |
| // Usage: | |
| // | |
| // In your SceneDelegate.swift: | |
| // | |
| // let presentationHelper = PresentationHelper() |
| import SwiftUI | |
| import Combine | |
| struct OnScroll: ViewModifier { | |
| @Binding var offset: CGFloat | |
| //we can have a version with a closure instead of the binding, but that triggers an infinite loop if content depends on the same Store | |
| // var onOffset: (CGFloat) -> () | |
| func body(content: Content) -> some View { | |
| return VStack { |
| // | |
| // AutocompleteView.swift | |
| // | |
| // Originally created by Daniel Weber on 9/28/14. | |
| // Copyright (c) 2014 Null Creature. All rights reserved. | |
| // Ported to Swift by Martin Pichlmair 2018 | |
| // | |
| import Cocoa |
| cat urls.csv | sed 's/\([^,]*\),\(.*mov\)\r/wget "\1" -O "\2"/' | sh | |
| the location and time of day are prepended to the filename. |
| @implementation CMFWallpaper | |
| + (void)setImage:(UIImage *)image { | |
| NSAssert([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized, @"access to photos is needed to set the wallpaper"); | |
| NSString *path; | |
| #if TARGET_OS_SIMULATOR | |
| path = @"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibrary.framework"; | |
| #else | |
| path = @"/System/Library/PrivateFrameworks/PhotoLibrary.framework"; |
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);