Skip to content

Instantly share code, notes, and snippets.

View ryandevore's full-sized avatar

Ryan DeVore ryandevore

View GitHub Profile
@ryandevore
ryandevore / UIColor+UUColorCreation.h
Created July 29, 2013 18:39
Simple category method to construct a UIColor object from a hex string.
@interface UIColor (UUColorCreation)
+ (UIColor*) uuColorFromHex:(NSString*)color;
@end
#import <Foundation/Foundation.h>
extern NSString * const kUURFC3339DateFormatter;
@interface UUDateFormatter : NSObject
+ (NSDate*) dateFromRfc3339String:(NSString*)string;
+ (NSDate*) dateFromString:(NSString*)string withFormat:(NSString*)format;
+ (NSString*) dateToRfc3339String:(NSDate*)date;
@ryandevore
ryandevore / NSFileManager+UUFileSizeCalculations.h
Created August 8, 2013 00:09
Sum all the file size under a given folder path
#import <Foundation/Foundation.h>
@interface NSFileManager (UUFileSizeCalculations)
- (unsigned long long) uuFileSizeAtPath:(NSString*)path;
@end
//
// UILabel+UUResizing.h
// Useful Utilities - UILabel resizing extensions
//
// License:
// You are free to use this code for whatever purposes you desire. The only requirement is that you smile everytime you use it.
//
// Contact: ryan@threejacks.com
//
// These methods are handy when dynamically resizing and positions labels in
@ryandevore
ryandevore / android_build_functions.sh
Last active May 14, 2018 18:18
A helpful set of bash functions for iOS and Android projects.
#!/bin/sh
# import common helper functions
. common_build_functions.sh
function UUClearCrashlyticsKeyAndSecret
{
if [ $# != 1 ]
then
echo "Usage: UUClearCrashlyticsKeyAndSecret [Android manifest path]"
@ryandevore
ryandevore / common.gradle
Last active August 7, 2021 00:16
Shared Gradle functions
def getVersionName = { ->
def name = project.hasProperty('versionName') ? versionName : "1.0"
println "VersionName is set to $name"
return "\"" + name.trim() + "\""
}
def getBuildBranch = { ->
def val = null
@ryandevore
ryandevore / uu_make_signing_key.sh
Created December 10, 2021 22:14
Create Android Signing Key
#!/bin/zsh
keytool -genkey -v -keystore release.keystore -alias upload_signing -storetype PKCS12 -keyalg RSA -keysize 2048 -validity 365000
@ryandevore
ryandevore / build_all.sh
Created April 22, 2022 18:16
iOS Build Scripts
#!/bin/sh
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $SCRIPT_DIR
# import common helper functions
. xcode_build_functions.sh
UUDebugLog "Building App Store IPA"
./build_appstore_ipa.sh
@ryandevore
ryandevore / uu_restart_adb.sh
Created April 21, 2023 14:05
Bash Script to restart Android Studio ADB
#!/bin/zsh
adb kill-server && adb start-server