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 cmd file is intended to be used with a task scheduler trigger (taskschd.msc). For example: | |
:: On workstation unlock | |
powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}" |
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
func checkAppVersion(requiredVersion: String) { | |
guard let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String else { return } | |
let currentVersionNumbers = version.components(separatedBy: ".") | |
let requiredVersionNumbers = requiredVersion.components(separatedBy: ".") | |
var count = 0 | |
for number in currentVersionNumbers { | |
if count < requiredVersionNumbers.count { | |
if compareNumeric(number, requiredVersionNumbers[count]) == .orderedAscending { | |
//TODO: self.forceUpdate() here |
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
/// Usage: Pass in the name of the UIViewController you wish to pop back to in the navigation stack. If no matching UIViewController is found, this fails silently. | |
/// Example: popToViewController(viewController: String(describing: StoreDetailsViewController.classForCoder())) | |
extension UIViewController { | |
func popToViewController(viewControllerNamed: String) { | |
if let viewControllers: [UIViewController] = self.navigationController?.viewControllers { | |
for view in viewControllers { | |
if (String(describing: view.classForCoder) == viewControllerNamed) { | |
self.navigationController?.popToViewController(view, animated: true) | |
break | |
} |
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
/// Returns a string with capitalized first character of every empty space seperated word. | |
/// | |
/// Example: | |
/// print(capitalize("123 Sean is super AwEsOmE 456!")); | |
/// => 123 Sean Is Super Awesome 456! | |
String capitalize(String string) { | |
if (string == null) { | |
throw ArgumentError("string: $string"); | |
} |
This file has been truncated, but you can view the full file.
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
User defaults from command line: | |
IDEArchivePathOverride = /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/__archive__406408938/Little Caesars.xcarchive | |
Build settings from command line: | |
COMPILER_INDEX_STORE_ENABLE = NO | |
Prepare build | |
note: Using legacy build system | |
=== BUILD TARGET BiometricAuthentication OF PROJECT Pods WITH CONFIGURATION Release === |
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
git push -f origin last_known_good_commit:branch_name |
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
(?s)(<<<<<<< HEAD)(.*?)(\=\=\=\=\=\=\=) |
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
NSMutableAttributedString *yourText = [[NSMutableAttributedString alloc] initWithString:@"Your block of text goes here."]; | |
// Value:urlLink, Key:blueText | |
NSDictionary *links = [[NSDictionary alloc] initWithObjectsAndKeys:@"http://www.google.com", @"here", nil]; | |
// Search and replace key words in the text with actual links | |
for (NSString *link in [links allKeys]) { | |
NSRange range = [consentCopy.string rangeOfString:link]; | |
[consentCopy addAttribute:NSLinkAttributeName value:[links valueForKey:link] range:range]; | |
} |