I hereby claim:
- I am lucien on github.
- I am lucienc (https://keybase.io/lucienc) on keybase.
- I have a public key ASBsIqqzG0YSb4suvNHgqKxBnbuWDRiRCAEwZ6i9asWLiQo
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]) | |
| } | |
| } |
I hereby claim:
To claim this, I am signing this object:
| import Foundation | |
| extension UIImage { | |
| func crop(rect: CGRect) -> UIImage? { | |
| var scaledRect = rect | |
| scaledRect.origin.x *= scale | |
| scaledRect.origin.y *= scale | |
| scaledRect.size.width *= scale |
| 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) |
I hereby claim:
To claim this, I am signing this object:
| typedef NS_ENUM(NSInteger, ScrollDirection) | |
| { | |
| ScrollDirectionDown = -1, | |
| ScrollDirectionNone, | |
| ScrollDirectionUp | |
| }; | |
| ################################### | |
| [RPMDefines statusBarSize].height = 20; |
| # 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 |
| NSArray *aporWords = @[@"apor", @"amor", @"calor", @"aviador"]; | |
| NSArray *filteredArray = [aporWords filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF MATCHES %@", @"\\b[a][a-z][o][r]\\b]"]]; |
| - (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)]; | |