This file contains 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
post_install do |pi| | |
download_executable_script_path = "./download_firebase_executables.rb" | |
system("ruby #{download_executable_script_path}") | |
end |
This file contains 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
# General Constants | |
APP_NAME = "myProject – PROD" # So you can identify your app in Slack, logs, etc. | |
# Team | |
USERNAME = "appstore@yourcompany.com" # The Username that you use to log in to AppStore Connect, or developer.apple.com | |
TEAM_ID = "ABCDEFGH" | |
# Code Signing | |
BUNDLE_ID = "com.yourproject.ent.prod" # Your App Bundle Identifier |
This file contains 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
# To disable the fan: | |
# Read the current minimum speed of fan 0, write this down so you can reset it later if you wish to | |
sudo /Applications/smcFanControl.app/Contents/Resources/smc -r -k F0Mn | |
# Set the minimum speed of fan 0. To set the min speed for fan 1, replace F0Mn with F1Mn. | |
sudo /Applications/smcFanControl.app/Contents/Resources/smc -k F0Mn -w 0000 | |
# Set the fan to forced speed mode. The parameter 0001 forces the speed of fan 0. To force fan 1, use 0002. To force both fans use 0003. | |
sudo /Applications/smcFanControl.app/Contents/Resources/smc -k "FS! " -w 0001 |
This file contains 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
+ (UIImage*)getLaunchImage | |
{ | |
UIImage* launchImage = nil; | |
NSArray* imagesDict = [[MainBundle infoDictionary] valueForKey:@"UILaunchImages"]; | |
for (NSDictionary* dict in imagesDict) { | |
CGSize launchImageSize = CGSizeFromString(dict[@"UILaunchImageSize"]); | |
if (CGSizeEqualToSize([UIScreen mainScreen].bounds.size, launchImageSize)) { | |
launchImage = [UIImage imageNamed:dict[@"UILaunchImageName"]]; | |
break; | |
} |
This file contains 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
/// Generates a unique integer from the combination of two integers | |
/// using the Cantor Pairing function. | |
/// | |
/// # Examples | |
/// | |
/// f(47, 32) = 3192 | |
/// | |
/// f(32, 47) = 3207 | |
/// | |
/// - seealso: https://en.wikipedia.org/wiki/Pairing_function#Cantor_pairing_function |
This file contains 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
precedencegroup optionalAssignPrecedence { | |
associativity: left | |
higherThan: AssignmentPrecedence | |
} | |
/// If rhs has a value, assigns rhs to lhs | |
/// If rhs is an empty optional, does nothing | |
infix operator ?= : optionalAssignPrecedence | |
func ?=<T: Any>(lhs: inout T, rhs: T?) { | |
if let rhs = rhs { |