Skip to content

Instantly share code, notes, and snippets.

View NSCabezon's full-sized avatar

Iván Cabezón Orjales NSCabezon

  • Madrid
View GitHub Profile
public class FrameUtils: NSObject {
// Resize to
public static func resize(frame: CGRect, toSize size: CGSize) -> CGRect {
return CGRect(x: frame.origin.x, y: frame.origin.y, width: size.width, height: size.height)
}
public static func resize(frame: CGRect, toWidth width: CGFloat, andHeight height: CGFloat) -> CGRect {
return CGRect(x: frame.origin.x, y: frame.origin.y, width: width, height: height)
{path_to_crashlytics}/Crashlytics.framework/submit {api_key} {build_secret} -ipaPath {path_to_ipa}/.ipa
@NSCabezon
NSCabezon / gist:2abffcdfc051ab42c7fc
Created November 7, 2015 11:16 — forked from justinokamoto/gist:9bbe8837081e1aa88041
Script for deploying iOS app to TestFlight with Xcode 6.1 & Xcode Server 4
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
# Valid and working as of 11/4/2014
# Xcode 6.1, XCode Server 4
#
API_TOKEN="<Your TestFlight API Token>"
Variable Example
PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
LANG en_US.US-ASCII
IPHONEOS_DEPLOYMENT_TARGET 4.1
ACTION build
AD_HOC_CODE_SIGNING_ALLOWED NO
ALTERNATE_GROUP staff
ALTERNATE_MODE u+w,go-w,a+rX
ALTERNATE_OWNER username
ALWAYS_SEARCH_USER_PATHS YES
//
// UIColor+UIColor_RandomColor.m
//
// Created by Ivan Cabezon on 06/08/14.
// Copyright (c) Ivan Cabezon. All rights reserved.
//
#import "UIColor+UIColor_RandomColor.h"
@implementation UIColor (UIColor_RandomColor)
git rm --cached ProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;