Skip to content

Instantly share code, notes, and snippets.

View kpgalligan's full-sized avatar

Kevin Galligan kpgalligan

View GitHub Profile
@jodell
jodell / xclang-grep-example.sh
Created September 27, 2012 15:28
xcode lang grep
cd /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources
grep -rohE 'xcode.lang.(\w*)' * | sort -u
@codebutler
codebutler / crashlytics_orgs.rb
Last active April 10, 2022 07:32
Crashlytics requires an IDE to "onboard" an Android app for no good reason. This prevents you from setting up a new app using a command line build tools such as Maven, Gradle or unsupported IDEs such as Android Studio. Turns out all you really need is your org's api key, which you can get using this script. Then just add this to your AndroidMani…
require 'httparty'
require 'json'
class Crashlytics
include HTTParty
base_uri 'https://api.crashlytics.com/api/v2'
def session(email, password)
self.class.post('/session.json',
body: {email: email, password:password}.to_json,
@kpgalligan
kpgalligan / gist:b0950ff433708b57ca0c
Last active August 29, 2015 14:07
Using serializable and parcelable

In general, avoid both. We should be using EventBus where possible, and passing arguments to Fractivities by reference rather than value.

However, saving state may need a more complex object, and you may need to pass data to Fractivities that can't be done with a reference.

In almost all cases, use Serializable. Be careful to write tests that actually attempt to serialize these objects. They won't actually be serialized until they need to be, which may not work if not tested.

Parcelable is "faster", but requires lots of explicit code that can be done incorrectly. Its also easy to forget updating the state manipulation methods when updating the objects themselves.

Comparison http://www.developerphil.com/parcelable-vs-serializable/