This file contains 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
typedef NS_ENUM(NSInteger, HTTPCodeInformation) { | |
Continue100 = 100, | |
SwitchingProtocols101 = 101, | |
Processing102 = 102 | |
}; | |
typedef NS_ENUM(NSInteger, HTTPCodeSuccess) { | |
Success200 = 200, | |
Created201 = 201, |
This file contains 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
require 'formula' | |
class Oclint < Formula | |
homepage 'http://oclint.org' | |
url 'https://github.com/oclint/oclint/releases/download/v0.10.2/oclint-0.10.2-x86_64-darwin-15.2.0.tar.gz' | |
version '0.10.2' | |
sha1 '4b61f83ccd55eeaa968ca5ee159e2528b4fbfeb5' | |
devel do | |
url 'https://github.com/oclint/oclint/releases/download/v0.10.2/oclint-0.10.2-x86_64-darwin-15.2.0.tar.gz' |
This file has been truncated, but you can view the full file.
This file contains 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
#!/usr/bin/env python | |
# | |
# Hi There! | |
# You may be wondering what this giant blob of binary data here is, you might | |
# even be worried that we're up to something nefarious (good for you for being | |
# paranoid!). This is a base85 encoding of a zip file, this zip file contains | |
# an entire copy of pip. | |
# | |
# Pip is a thing that installs packages, pip itself is a package that someone | |
# might want to install, especially if they're looking to run this get-pip.py |
This file contains 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
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.4.3 (252) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
This file contains 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
@interface UIImageView (DottableImage) | |
- (void) dottedPatternFrom:(CGPoint)fromPoint to:(CGPoint)toPoint forWidth:(CGFloat)width; | |
@end | |
@implementation UIImageView (DottableImage) | |
float const DefaultDottedImageWidth = 5.0f; |
This file contains 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
- (void)boldSubText | |
{ | |
NSString *textToAttribute = @"abcdefg*-hijklm-*nopqrst*-uvwxyz-*"; | |
NSDictionary *boldAttributeDict = @{NSFontAttributeName: | |
[UIFont robotoBoldFontOfSize:MODAL_INFORMATION_FONT_SIZE_DESCRIPTION]}; | |
NSArray<NSString *> *splittedSubText = [textToAttribute componentsSeparatedByString:@"*"]; | |
NSMutableArray<NSAttributedString*> *splittedAttributedStringArray = [[NSMutableArray alloc] initWithCapacity:splittedSubText.count]; | |
[splittedSubText enumerateObjectsUsingBlock:^(NSString *_Nonnull splittedString, NSUInteger idx, BOOL *_Nonnull stop) { |
This file contains 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
#import <UIKit/UIKit.h> | |
#ifndef __IPHONE_7_0 | |
#error Because of Dynamic Kit, this custom flowLayout requires APIs only available in iOS SDK 7.0 and later | |
#endif | |
/** | |
* A UICollectionViewFlowLayout subclass that, when implemented, | |
* creates a dynamic / elastic scroll effect for UICollectionViews | |
*/ |
This file contains 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
extension Alamofire.Request { | |
func responseDebugPrint() -> Self { | |
return responseJSON() { | |
response in | |
if let JSON: AnyObject = response.result.value, | |
JSONData = try? NSJSONSerialization.dataWithJSONObject(JSON, options: .PrettyPrinted), | |
prettyString = NSString(data: JSONData, encoding: NSUTF8StringEncoding) { | |
print(prettyString) | |
} else if let error = response.result.error { | |
print("Error Debug Print: \(error.localizedDescription)") |
This file contains 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
// | |
// FontConfiguration.swift | |
// juliengdt | |
// | |
// Created by Julien Goudet on 26/09/2016. | |
// Based on: https://www.iphonelife.com/blog/31369/swift-programming-101-mastering-dynamic-type-ios | |
// | |
import Foundation |
This file contains 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
extension UICollectionView { | |
public var rx_reachedBottom: Observable<Void> { | |
return self.rx.contentOffset | |
.map { contentOffset in | |
var responder: UIResponder = self | |
var viewController: UIViewController? = nil | |
while let next = responder.next { | |
viewController = next as? UIViewController | |
if viewController != nil { |