Skip to content

Instantly share code, notes, and snippets.

View alloy's full-sized avatar

Eloy Durán alloy

View GitHub Profile
Pod::Spec.new do |s|
s.name = 'HockeySDK-Mac'
s.version = '2.1.0'
s.summary = 'Collect crash reports with HockeyApp.'
s.description = <<-DESC
HockeyApp is a service to distribute beta apps, collect crash reports and
communicate with your app's users.
It improves the testing process dramatically and can be used for both beta

Convert all specifications to JSON. This is the end of an era. We (the CocoaPods team) would like to thank from the bottoms of our hearts, our very own Keith Smiley, The Legend.

With a deft flick of the thumb, @keithbsmiley has decided on the fate of thousands of pull-requests. The community owes you its eternal gratitude.

💖🎉💖

@alloy
alloy / gist:1700c2574d70de944f9f
Last active August 29, 2015 14:03
System Ruby on OS X 10.10 Preview 2: Psych YAML extension is installed as gem and thus doesn’t work if the user has GEM_* env variables set.
» env GEM_HOME=/gem/home/without/psych/gem GEM_PATH=/gem/home/without/psych/gem ruby -ryaml -e ''
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:4:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- psych (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:5:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require
@alloy
alloy / gist:8739bd036d084d8c082b
Last active August 29, 2015 14:03
Ruby with Psych bundled as gem can no longer work with YAML if the GEM_PATH environment variable is set incorrectly. (This includes it pointing to another Ruby installation!)
$ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin14]
$ env GEM_PATH=/gem/home/without/psych/gem ruby -ryaml -e ''
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:4:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- psych (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:5:in `<top (required)>'
@alloy
alloy / list-object-files-in-slice
Created July 16, 2014 17:37
Duplicate object files in arch slices of Realm.framework
~/t/R/TestRealm » lipo -info vendor/Pods/Realm/realm-ios-0.80.0/Realm.framework/Realm
Architectures in the fat file: vendor/Pods/Realm/realm-ios-0.80.0/Realm.framework/Realm are: armv7 armv7s i386 x86_64 arm64
~/t/R/TestRealm » lipo -thin i386 vendor/Pods/Realm/realm-ios-0.80.0/Realm.framework/Realm -output libRealm-i386.a
~/t/R/TestRealm » ar -t libRealm-i386.a
__.SYMDEF
RLMArray.o
RLMArrayLinkView.o
RLMProperty.o
~/C/R/S/InteractiveRubyMotion [master] » irb
irb(main):001:0> class A
irb(main):002:1> def foo
irb(main):003:2> "A"
irb(main):004:2> end
irb(main):005:1> end
=> nil
irb(main):006:0> class B < A
irb(main):007:1> def foo
irb(main):008:2> super + "B"
def loadView
view = NSView.new
def view.drawRect(rect)
NSColor.redColor.setFill
NSRectFill(rect)
end
self.view = view
end
~/C/C/X/s/plutil_helper [master] » clang -ObjC -framework Foundation plutil.m -o plutil
In file included from plutil.m:1:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:7:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSRange.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:12:1: error: 'objc_returns_inner_pointer' attribute only applies to methods
@property (readonly) const char *objCType NS_RETURNS_INNER_POINTER;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from plutil.m:1:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:15:
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXAggregateTarget section */
E550D6AA16371AF600A003E9 /* Aggregate */ = {

After copying the patch into the OS X pasteboard, the patch like so:

$ cd /Library/RubyMotion
$ pbpaste | patch -p1