Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am geoffevason on github.
* I am geoffevason (https://keybase.io/geoffevason) on keybase.
* I have a public key ASB107VJ0f4R57ix0SmEAWThbSs6b69C4YgJOcPNbp0MbQo
To claim this, I am signing this object:
@geoffevason
geoffevason / upload_help
Created January 28, 2015 15:03
iTMSTransporter upload options
usage: iTMSTransporter -m upload [-assetReplacementVerification <arg>] [-delete |
-success <arg>] [-deleteFastTransportLog <arg>] [-errorLogs <arg>] -f <arg>
[-failure <arg>] [-k <arg>] [-loghistory] [-numStreams <arg>] [-outputFormat
<arg>] [-p <arg>] [-s <arg>] [-t <arg>] [-throughput] -u <arg>
-assetReplacementVerification <arg> The -assetReplacementVerification option is
only valid when the transport is 'Aspera',
'Signiant' or DAV (the default). Its value can
be 'true' or 'false'. When the value is true,
a package will receive an error and not be
uploaded if any of its files will be replaced
@geoffevason
geoffevason / gist:10755a2e143795e45b95
Created August 14, 2014 16:51
Code to create an ActiveRecord object by calling create on a base class but actually getting a child class object based on the type attribute provided.
class Element < ActiveRecord::Base
# This code lets us create the right type of class by passing in :type
# eg: Element.new(:type => 'TitleElement') will crteate a TitleElement
class << self
def class_from_args(a)
if (h = a.first).is_a? Hash and (type = h[:type] || h['type']) and (klass = type.constantize) != self
raise "Unknown type" unless klass < self # klass should be a descendant of us
return klass
end