Skip to content

Instantly share code, notes, and snippets.

class TrueClass
def !
return !super
end
end
should_be_true = (1 == 1)
if !should_be_true
puts "I'm so not true..." # => I'm so not true...
class ChannelListHeaderLayout < MotionKit::Layout
def layout
root :cell do
context target.contentView do
add UIImageView, :logo
end
end
end
class ChannelListHeaderLayout < MotionKit::Layout
def layout
root :cell do
add UIImageView, :logo
end
end
def cell_style
background_color UIColor.whiteColor
@buffpojken
buffpojken / gist:9811802
Created March 27, 2014 16:33
Motion crash
nightgaunt:VideoTestVLC buffpojken$ rake
Build ./build/MacOSX-10.9-Development
Compile ./app/menu.rb
Compile ./app/app_delegate.rb
Compile ./app/Controllers/video_controller.rb
Create ./build/MacOSX-10.9-Development/VideoTestVLC.app/Contents
Create ./build/MacOSX-10.9-Development/VideoTestVLC.app/Contents/MacOS
Link ./build/MacOSX-10.9-Development/VideoTestVLC.app/Contents/MacOS/VideoTestVLC
Create ./build/MacOSX-10.9-Development/VideoTestVLC.app/Contents/PkgInfo
Copy /Users/buffpojken/Projects/Motion/VideoTestVLC/VLCKit.framework
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
* in FIPS 180-1
* Version 2.2 Copyright Paul Johnston 2000 - 2009.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for details.
*/
/*
def ninja(&block)
if block_given?
block.call("ninja")
else
puts "laser"
end
end
ninja do |hugo|
puts "Block:"+hugo
@buffpojken
buffpojken / gist:736035
Created December 10, 2010 09:49
Roulette.
%w(rubygems json rest-client).map{|a|require a};puts"Amount betted:";a = gets;JSON.parse(RestClient.get("http://roulette.engineyard.com/")).each_pair{|k,v|v.eql?("13") ? (puts"You've won #{a.to_i*35}"):(puts "No winnings!")}