References:
- http://blog.bekijkhet.com/2012/05/install-teamcity-continuous-integration.html
- https://gist.github.com/ianbattersby/4641450
sudo apt-get update
public class ReducedController : Controller | |
{ | |
private readonly IContainProducts productRepository; | |
private readonly ISearchForProducts productsIndex; | |
private readonly IContainCustomers customerRepository; | |
private readonly IShipProducts productShipper; | |
private readonly ICoordinateSales salesCatalog; | |
public ReducedController( | |
IContainProducts productRepository, |
/** | |
* Converts a timestamp to how long ago syntax | |
* @param time The time in seconds | |
* @return The formatted time | |
*/ | |
public static String timeAgo(int time) | |
{ | |
Unit[] units = new Unit[] | |
{ | |
new Unit("s", 60, 1), |
#import <objc/runtime.h> | |
#import <UIKit/UIKit.h> | |
@interface UIWebView (HackishAccessoryHiding) | |
@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView; | |
@end | |
@implementation UIWebView (HackishAccessoryHiding) | |
static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView"; |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
References:
sudo apt-get update
[assembly: WithBus] |
static BOOL PSPDFIsDevelopmentBuild(void) { | |
#if TARGET_IPHONE_SIMULATOR | |
return YES; | |
#else | |
static BOOL isDevelopment = NO; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
// There is no provisioning profile in AppStore Apps. | |
NSData *data = [NSData dataWithContentsOfFile:[NSBundle.mainBundle pathForResource:@"embedded" ofType:@"mobileprovision"]]; | |
if (data) { |
#!/bin/bash | |
git branch --merged | while read line | |
do | |
# If the line is in the format '* master' (indicating the current branch), | |
# this will be effectively empty, so we don't somehow delete the current | |
# branch | |
BRANCH=`echo "$line" | awk -F '*' '{ print $1 }'` | |
if [ -z "$BRANCH" ] |
@interface UIColor (WBDebugExtensions) | |
@end | |
@implementation UIColor (DebugExtensions) | |
- (id)debugQuickLookObject { | |
UIGraphicsBeginImageContext(CGSizeMake(128, 128)); | |
[self setFill]; | |
[[UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 128, 128)] fill]; |