Skip to content

Instantly share code, notes, and snippets.

View intellitour's full-sized avatar
🤓
Nerding

Pedro Henrique intellitour

🤓
Nerding
View GitHub Profile
@intellitour
intellitour / AppDelegate.swift
Last active November 5, 2021 02:33
Onboarding
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
let scene = UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
let hasSeenOnboarding = UserDefaults.standard.bool(forKey: "onboarding")
if hasSeenOnboarding {
let main = UIStoryboard(name: "Main", bundle: .main)
scene.storyboard = main
}else {
struct GridLayout {
private(set) var size: CGSize
private(set) var rowCount: Int = 0
private(set) var columnCount: Int = 0
init(itemCount: Int, nearAspectRatio desiredAspectRatio: Double = 1, in size: CGSize) {
self.size = size
guard size.width != 0, size.height != 0, itemCount > 0 else { return }
var bestLayout: (rowCount: Int, columnCount: Int) = (1, itemCount)
var smallestVariance: Double?
@intellitour
intellitour / webstorm.vmoptions
Created November 8, 2020 11:49
Webstorm VMOptions
-Xms16m
-Xmx6G
-XX:ReservedCodeCacheSize=420m
-XX:+UseNUMA
-XX:+UseG1GC
-XX:ConcGCThreads=2
-XX:+G1UseAdaptiveIHOP
-XX:+UseGCOverheadLimit
-XX:MaxMetaspaceSize=2G
-XX:+ParallelRefProcEnabled
-Xms16m
-Xmx6G
-XX:+UseG1GC
-XX:G1HeapRegionSize=2
-XX:MaxGCPauseMillis=100
-XX:+UseStringDeduplication
-XX:SoftRefLRUPolicyMSPerMB=75
-ea
-Xms16m
-Xmx6G
-XX:ReservedCodeCacheSize=420m
-XX:+UseNUMA
-XX:+UseG1GC
-XX:ConcGCThreads=2
-XX:+G1UseAdaptiveIHOP
-XX:+UseGCOverheadLimit
-XX:MaxMetaspaceSize=2G
-XX:+ParallelRefProcEnabled