This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddVerminToBuffet < ActiveRecord::Migration | |
def change | |
add_column :buffets, :vermin, :boolean, default: true | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[string drawAtPoint:point withFont:font]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def draw_feature(context, atPoint:feature_point) | |
size = 6 | |
startx = feature_point.x - (size/2) | |
starty = feature_point.y - (size/2) | |
CGContextAddRect(context, [[startx, starty], [size, size]]) | |
CGContextDrawPath(context, KCGPathFillStroke) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
@window.rootViewController = RootController.alloc.init | |
#Splash Screen | |
image_view = UIImageView.alloc.initWithImage(UIImage.imageNamed("Default.png")) | |
@window.rootViewController.view.addSubview(image_view) | |
@window.rootViewController.view.bringSubviewToFront(image_view) | |
# normal | |
@window.makeKeyAndVisible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 class Appetizer < ActiveRecord::Base | |
2 include ActiveModel::ForbiddenAttributesProtection | |
3 end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RootController < UIViewController | |
include MotionAwesome | |
def layoutDidLoad | |
# Custom Navigation Title | |
@mine = label( :beer, text: "Get Crunk" ) do |label| | |
label.backgroundColor = UIColor.clearColor | |
label.sizeToFit | |
self.navigationItem.titleView = label | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SampleCode | |
attr_accessor :lines | |
DOMAIN = "www.yourdomain.com" | |
def next_line | |
if @lines.blank? | |
#refurnish | |
@lines = App::Persistence['quips'].dup | |
@lines.shuffle! | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
true | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources :coordinator_groups do | |
resources :events do | |
resources :teams | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project/template/ios' | |
Motion::Project::App.setup do |app| | |
# Use `rake config' to see complete project settings. | |
app.name = 'SocialFramework' | |
# Old way was to include the Twitter framework here | |
app.frameworks += ["Social", "Accounts"] | |
end |
OlderNewer