Skip to content

Instantly share code, notes, and snippets.

View NSMutableString's full-sized avatar
🏡
Working from home

Bram Huenaerts NSMutableString

🏡
Working from home
View GitHub Profile
@NSMutableString
NSMutableString / unitTests.swift
Created December 9, 2019 15:46
Enable unit testing on large projects the easy way (without selecting all files individually)
// Performance hit taken with this approach
@testable import TestProduct
// Best way stays adding the files you want to test to the test target...
@NSMutableString
NSMutableString / showXcodeBuildDuration.sh
Created September 11, 2019 13:09
XCode show build duration
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES
@NSMutableString
NSMutableString / String+Foundation.swift
Last active November 16, 2019 17:51
Correct URL encoding
private extension String {
var urlEscaped: String? {
return self.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)
}
}
@NSMutableString
NSMutableString / terminal
Created December 10, 2013 18:49
Show hidden files on mac using Finder
defaults write com.apple.Finder AppleShowAllFiles YES
killall Finder
#import <Foundation/Foundation.h>
@interface NSString (Mod97Check)
- (BOOL)passesMod97Check; // Returns result of mod 97 checking algorithm. Might be used to check IBAN.
// Expects string to contain digits and/or upper-/lowercase letters; space and all the rest symbols are not acceptable.
@end