This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
class MyViewController < UIViewController | |
include ViewTags | |
#by convention, these views will have tags that correspond to the order you specify them in | |
# :date_label:1, :name_label:2 | |
has_view :date_label, :name_label | |
def loadView | |
views = NSBundle.mainBundle.loadNibNamed "myview", owner:self, options:nil | |
self.view = views[0] |
# encoding: UTF-8 | |
class String | |
# Extend string to include transliterations to different orthographies | |
# from Latin character set or the reverse (`to_latin`) | |
# | |
# Supported Orthographies: | |
# Arabic, Cyrillic, Greek, Hangul, Hiragana, Katakana, Latin, Thai | |
# |
#!/usr/bin/env macruby -wKU | |
framework 'Foundation' | |
p myDate = NSDate.dateWithNaturalLanguageString("tomorrow", locale:nil) | |
p myDate = NSDate.dateWithNaturalLanguageString("last monday", locale: nil) | |
p myDate = NSDate.dateWithNaturalLanguageString("this tuesday at 5:00 o'clock pm", locale: nil) | |
p myDate = NSDate.dateWithNaturalLanguageString("may 27th", locale: nil) | |
p myDate = NSDate.dateWithNaturalLanguageString("6/4/2012", locale: nil) | |
<? | |
/** | |
* twitterfeed.php | |
* | |
* A single file script which serves an authenticated personal Twitter timeline as an Atom feed. | |
* | |
* To use: | |
* 1) Go to https://dev.twitter.com/apps and create a new App | |
* 2) Use the Authentication button to create the tokens/secrets needed | |
* 3) Copy the results into the appropriate spots below |
class Transformer | |
def self.withName(name, class:klass, &block) | |
if block_given? | |
transformer = Transformer.new(&block) | |
transformer.build(name, transformedValueClass:klass) | |
end | |
end | |
def initialize(&dsl_code) | |
@transform = @reverse = nil |
# code inspired from http://jainmarket.blogspot.com/2009/05/creating-custom-table-view-cell.html | |
class CustomCell < UITableViewCell | |
attr_accessor :primaryLabel | |
attr_accessor :secondaryLabel | |
def createLabels | |
@primaryLabel = UILabel.alloc.init |
(function () { | |
if (!window.fluid) { | |
alert("This script is meant to be run in Fluid! You should disable it."); | |
return; | |
} | |
window.fluid.dockBadge = ''; | |
setInterval(newNotif, 500); |
I don't want anyone to think that I am not a big fan of ReactiveCocoa. I'm a HUGE FAN of it!
But look how LONG it took for something like this to come about. Cocoa is an OLD OLD system, and even though KVO/KVC wasn't there at the birth, it has been there at least a decade. I pretty much gave up on Obj-C in favor of RubyMotion, and look at our landscape: Futuristic, ProMotion, Formotion, Geomotion, Elevate, Teacup - all of these projects bring expressiveness to Cocoa, and RubyMotion is barely a year old.
So what I meant to say is that Obj-C suffers from a lack of expressiveness - this has nothing to do with ReactiveCocoa, that's just my example. To illustrate my point, I will translate the first example of the ReactiveCocoa README. I encourage you to read the ReactiveCocoa source and try and consolidate all the code that is used to handle this function. I will include all of the Ruby code that is necessary for my translation to work.
I do have one qualm with ReactiveCocoa: the names. I'm going to t
#!/Library/RubyMotion/bin/ruby -wKUW0 | |
# if your using MacRuby you might change this to | |
# => #!/usr/bin/env macruby -wKUW0 | |
framework 'Foundation' | |
framework 'ScriptingBridge' | |
# the original is part of an arstechnica article by Ryan | |
# SOURCE: http://arstechnica.com/apple/2011/09/tutorial-os-x-automation-with-macruby-and-the-scripting-bridge/ | |
# this script with get your favourite songs and create a Evernote Note # German and English |