This file contains hidden or 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
| window.onload = function() { | |
| var command; | |
| var colors = ['#b89a7b', '#9bbaac']; | |
| // setup the websocket | |
| var socket = new WebSocket('ws://localhost:8888/chatsocket'); | |
| socket.onmessage = function(e) { | |
| console.log(e.data); |
This file contains hidden or 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 ConsoleCanvas < Array | |
| def height; self.size; end | |
| def width; self[0].size; end | |
| def initialize(w,h) | |
| super(h){Array.new(w,' ')}; system 'stty -icanon -echoke' | |
| end | |
| def set(x,y,v) | |
| self[y.to_i][x.to_i]=v if (0...width).include?(x) && (0...height).include?(y) |
This file contains hidden or 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 = ConstraintScreen.new | |
| @window.makeKeyAndVisible | |
| true | |
| end | |
| end | |
| class ConstraintScreen < UIViewController |
This file contains hidden or 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 = ConstraintScreen.new | |
| @window.makeKeyAndVisible | |
| true | |
| end | |
| end | |
| class ConstraintScreen < UITableViewController |
This file contains hidden or 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 = TableViewController.new | |
| @window.makeKeyAndVisible | |
| end | |
| end | |
| class TableViewController < UITableViewController | |
| stylesheet :main |
This file contains hidden or 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 load_incoming_ticket_data | |
| Location.boston do |location| | |
| location.find_ticket(@incoming_ticket_number) do |ticket| | |
| LocalTicket.persist ticket | |
| alert = BW::UIAlertView.default( | |
| title: "Ticket #{ticket_id} is ready to be paid", | |
| buttons: ["Pay later", "Pay now!"] | |
| ) do |alert2| | |
| if alert2.clicked_button.index == 1 | |
| left_menu_view_controller.show_ticket ticket |
This file contains hidden or 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
| - (id)initWithBitmapDataPlanes:(unsigned char **)planes | |
| pixelsWide:(NSInteger)width | |
| pixelsHigh:(NSInteger)height | |
| bitsPerSample:(NSInteger)bps | |
| samplesPerPixel:(NSInteger)spp | |
| hasAlpha:(BOOL)alpha | |
| isPlanar:(BOOL)isPlanar | |
| colorSpaceName:(NSString *)colorSpaceName | |
| bitmapFormat:(NSBitmapFormat)bitmapFormat | |
| bytesPerRow:(NSInteger)rowBytes |
This file contains hidden or 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
| Create ./build/iPhoneOS-6.1-Development/TicketZen.dSYM | |
| Codesign ./build/iPhoneOS-6.1-Development/TicketZen.app | |
| Create ./build/iPhoneOS-6.1-Development/TicketZen.ipa | |
| Deploy ./build/iPhoneOS-6.1-Development/TicketZen.ipa | |
| rake aborted! | |
| undefined method `[]' for nil:NilClass | |
| /Library/RubyMotion/lib/motion/project/template/ios/config.rb:107:in `read_provisioned_profile_array' | |
| /Library/RubyMotion/lib/motion/project/template/ios/config.rb:112:in `provisioned_devices' | |
| /Library/RubyMotion/lib/motion/project/template/ios.rb:161:in `block in <top (required)>' | |
| /Users/pachun/.rvm/gems/ruby-2.0.0-p195@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call' |
This file contains hidden or 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 < PM::Delegate | |
| def on_load(app, options) | |
| open GreenScreen.new(nav_bar: true) | |
| end | |
| end | |
| class GreenScreen < ProMotion::Screen | |
| attr_accessor :one_section_button, :two_section_button | |
| title 'Green' |
This file contains hidden or 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 TrioTracker | |
| def initialize | |
| draw_window | |
| add_header | |
| end | |
| def draw_window | |
| Shoes.app(width:1280, height:800, title:'Trio Tracker') | |
| end |