I hereby claim:
- I am Lucien on github.
- I am lucienc (https://keybase.io/lucienc) on keybase.
- I have a public key whose fingerprint is 4445 E787 5A72 DCBA B913 8F61 94EE BBAE A680 F365
To claim this, I am signing this object:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.viewController = [[JBViewController alloc] initWithNibName:@"JBViewController" bundle:nil]; | |
self.window.rootViewController = self.viewController; | |
// ADD THIS LINE: | |
[self.window setTransform:CGAffineTransformMakeScale(0.81, 0.81)]; | |
NSArray *aporWords = @[@"apor", @"amor", @"calor", @"aviador"]; | |
NSArray *filteredArray = [aporWords filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF MATCHES %@", @"\\b[a][a-z][o][r]\\b]"]]; |
# Get current song, album and artist from iTunes. | |
# | |
# Intended for use with Smile Software's TextExpander: | |
# http://www.smilesoftware.com/TextExpander/index.html | |
# | |
# Set up as a snippet to turn current track into text. A nice way to spin your wheels while writing/coding/contemplating the shape of the universe. | |
tell application "iTunes" | |
set current_song to the name of current track | |
set current_artist to the artist of current track |
typedef NS_ENUM(NSInteger, ScrollDirection) | |
{ | |
ScrollDirectionDown = -1, | |
ScrollDirectionNone, | |
ScrollDirectionUp | |
}; | |
################################### | |
[RPMDefines statusBarSize].height = 20; |
I hereby claim:
To claim this, I am signing this object:
import UIKit | |
extension CGImage { | |
func increaseWidthToMultipleOfSeventeen(completion: @escaping (CGImage?) -> (Void)) { | |
DispatchQueue.global(qos: .background).async { [weak self] in | |
guard let strongSelf = self else { | |
DispatchQueue.main.async { | |
completion(nil) |
import Foundation | |
extension UIImage { | |
func crop(rect: CGRect) -> UIImage? { | |
var scaledRect = rect | |
scaledRect.origin.x *= scale | |
scaledRect.origin.y *= scale | |
scaledRect.size.width *= scale |
I hereby claim:
To claim this, I am signing this object:
extension String { | |
func substring(range: NSRange) -> String { | |
let location = range.lowerBound | |
let lenght = range.upperBound | |
let start = index(startIndex, offsetBy: location) | |
let end = index(start, offsetBy: length - location) | |
return String(self[start ..< end]) | |
} | |
} |