| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
| // | |
| // UISegmentedControl+Multiline.h | |
| // | |
| // Created by Guilherme Araújo on 6/9/14. | |
| // Copyright (c) 2014 Guilherme Araújo. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> | |
| @interface UISegmentedControl (Multiline) |
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
| // Open Settings directly for the app | |
| [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; |
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
| // NSFormattingContext is new in iOS 8. For NSFormattingContextDynamic it promises is following: | |
| // The capitalization context is determined dynamically from the set {NSFormattingContextStandalone, NSFormattingContextBeginningOfSentence, NSFormattingContextMiddleOfSentence}. For example, if a date is placed at the beginning of a sentence, NSFormattingContextBeginningOfSentence is used to format the string automatically. When this context is used, the formatter will return a string proxy that works like a normal string in most cases. After returning from the formatter, the string in the string proxy is formatted by using NSFormattingContextUnknown. When the string proxy is used in stringWithFormat:, we can determine where the %@ is and then set the context accordingly. With the new context, the string in the string proxy will be formatted again and be put into the final string returned from stringWithFormat:. | |
| // Here's a simple example: | |
| NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
| dateFor |
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
| "Alfred 2"; idea;Thunder*; iTerm; Terminal;php; Dropbox; Sparrow; "Sequel Pro"; python; ruby; wget; curl; GitHub; git-remote-https; npm; node; perl;prl*;itunes; sftp; whois;traceroute;stroke;ssh;ALiWangwang;MacUpdate*;git*;Git;fzs*;mail;flickr*;xulr*;imess*;com.apple.im*;Airmail;Adium;Prot*;Tokens;Ali*;Lite*;file*;ssh;ftp;Adobe*;PDApp*;Creative*;Vbox*;xulrunner;Virtual*;PDApp;Bit*;Domainers;fire*;plugin*;Atom*;Tokens;.com.realmacsoftware*;Xcode;java;httpd; |
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
| -(UIImage*)mmg_imageScaledToFitSize:(CGSize)fitSize | |
| { | |
| // Create a vImage_Buffer from the CGImage | |
| CGImageRef sourceRef = self.CGImage; | |
| vImage_Buffer srcBuffer; | |
| vImage_CGImageFormat format = { | |
| .bitsPerComponent = 8, | |
| .bitsPerPixel = 32, | |
| .colorSpace = NULL, | |
| .bitmapInfo = (CGBitmapInfo)kCGImageAlphaFirst, |
This script scans your Dropbox (or any given folder) for folders stored in the ignore array and excludes them from syncing. Makes use of the official Dropbox CLI
I'm a beginner at bash, so all improvements are welcome!
#!/bin/bash
set -e
# SETTINGS
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
| @implementation UIFont (PSPDFAdditions) | |
| // https://gist.github.com/nuthatch/7594460 | |
| static CGFloat PSPDFMultiplicatorForPreferredContentSize(void) { | |
| CGFloat multiplicator = 1.f; | |
| NSString *preferredTextStyle = UIApplication.sharedApplication.preferredContentSizeCategory; | |
| if ([preferredTextStyle isEqualToString:UIContentSizeCategoryExtraSmall]) { | |
| multiplicator = 0.9f; | |
| }else if ([preferredTextStyle isEqualToString:UIContentSizeCategorySmall]) { | |
| multiplicator = 0.95f; |
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
| // Author - Santosh Rajan | |
| import Foundation | |
| let jsonObject: [AnyObject] = [ | |
| ["name": "John", "age": 21], | |
| ["name": "Bob", "age": 35], | |
| ] | |
| func JSONStringify(value: AnyObject, prettyPrinted: Bool = false) -> String { |