Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
#
# ExtractStoryboardIdentifiers.rb
#
# By Eric Baker.
# 25/August/2015
#
# Call this script from a Run Script build phase:
@ebaker355
ebaker355 / IncrementBuildNumber.rb
Created October 8, 2012 23:00
Increment Xcode project build number
#!/usr/bin/ruby
# Call via a run script build phase:
#
# ${SRCROOT}/IncrementBuildNumber.rb
#
require 'fileutils'
require 'pathname'
@ebaker355
ebaker355 / PaintCodeDrawableImages.m
Created October 8, 2012 15:13
PaintCodeDrawableImages
typedef void (^PaintCodeSourceBlock)();
@implementation PaintCodeDrawableImages
+ (UIImage *)drawImageWithSize:(CGSize)size paintCodeSource:(PaintCodeSourceBlock)paintCodeSourceBlock
{
// Begin the image context.
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0f);
// Draw the paint code image.
@ebaker355
ebaker355 / UIColor+AppleCrayons.h
Created October 8, 2012 15:06
UIColor+AppleCrayons
#import <UIKit/UIKit.h>
@interface UIColor (AppleCrayons)
+ (UIColor *)cantaloupeColor;
+ (UIColor *)honeydewColor;
+ (UIColor *)spindriftColor;
+ (UIColor *)skyColor;
+ (UIColor *)lavenderColor;
+ (UIColor *)carnationColor;
@ebaker355
ebaker355 / LocalizeStringsFromAndroid.rb
Created July 31, 2012 14:41
Translate Android strings.xml files to iOS Localizable.strings files
#!/usr/bin/env ruby
# gist: https://gist.github.com/3217498
# This script can be called from an Xcode 'Run Script' build phase at the
# beginning of the build process, like this:
#
# ${PROJECT_DIR}/LocalizeStringsFromAndroid.rb ${PROJECT_NAME}
#
# This script should be placed in the same directory as your .xcodeproj