Skip to content

Instantly share code, notes, and snippets.

View joshdholtz's full-sized avatar
👨‍👩‍👦
Family first then OSS

Josh Holtz joshdholtz

👨‍👩‍👦
Family first then OSS
View GitHub Profile
@joshdholtz
joshdholtz / gist:56296881ccb3f3a7dd82
Created May 1, 2015 21:33
Fastlane - Get version and build number
# If you call these increment calls, the version numbers and build numbers should be avaiable in the Actions.lane_context
Actions.lane_context[Actions::SharedValues::BUILD_NUMBER]
Actions.lane_context[Actions::SharedValues::VERSION_NUMBER]
@joshdholtz
joshdholtz / omg.sh
Last active August 29, 2015 14:17
.mov to .gist
brew install ffmpeg
brew install gifsicle
mkdir pngs
mkdir gifs
ffmpeg -i exportation-edited.mov -r 10 ./pngs/out%04d.png
cd pngs
for i in *.png; do sips --resampleWidth 640 $i; done
for i in *.png; do sips -s format gif $i --out ../gifs/$i.gif;done
cd ../gifs
gifsicle ./*.gif --optimize=3 --delay=3 --loopcount --colors 256 > ../animation.gif
@joshdholtz
joshdholtz / MacroMaster.h
Created March 10, 2015 15:23
I'm a Macro Master - IS_NIL
#define IS_NIL(thing) ((thing == nil) || (thing == [NSNull null]))
@joshdholtz
joshdholtz / Floor.h
Last active August 29, 2015 14:16
RLMObject+Additions
//
// FloorModel.h
//
// Created by Josh Holtz on 3/4/15.
// Copyright (c) 2015 RokkinCat. All rights reserved.
//
#import "RLMObject.h"
@interface FloorModel : RLMObject
@joshdholtz
joshdholtz / .env
Created March 4, 2015 01:26
Fastlane with different brands
# General ENV stuff used for all environments (brands)
WORKSPACE=YouApp.xcworkspace
@joshdholtz
joshdholtz / Sample.m
Last active August 29, 2015 14:16
Get RLMResults after writing multiple objects
/*
* The reason I am looking for this as an RLMResults so I can query Realm before my request to get new data comes back.
* I want both the local querying and the creating/updating to return in the same format (RLMResults)
*
* I am new to Realm so please tell me if I should be going about this a different way.
*/
+ (RLMResults*)saveResponse:(NSArray*)response {
// Gets real and creates set of ids that were added/updated
@joshdholtz
joshdholtz / JSONKit.m
Created February 23, 2015 04:54
JSONKit.m for iOS 7 - NEVER EVER EVER USE THIS
//
// JSONKit.m
// http://github.com/johnezang/JSONKit
// Dual licensed under either the terms of the BSD License, or alternatively
// under the terms of the Apache License, Version 2.0, as specified below.
//
/*
Copyright (c) 2011, John Engelhart
# Had to use Fastfile.rb ^^ so that Github would keep it Ruby highlighted :(
# S3 Directory Structurer
#
# - fastlane-test-bucket
# - tehetehe.html
# - v0.9.0_b20
# - SnapifeyePro.app.dSYM.zip
# - SnapifeyePro.ipa
# - SnapifeyePro.plist
@joshdholtz
joshdholtz / example_usage.ex
Last active August 29, 2015 14:15
Lazy Float
thing_1 = Project.Thing.create( %{ value: 3 } )
thing_2 = Project.Thing.create( %{ value: "3.2" } )
thing_3 = Project.Thing.create( %{ value: 3.2 } )
@joshdholtz
joshdholtz / snapshot.js
Created January 22, 2015 17:28
Image file is saved portrait
#import "SnapshotHelper.js"
var target = UIATarget.localTarget();
var app = target.frontMostApp();
var window = app.mainWindow();
target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_LANDSCAPELEFT);
target.delay(3)