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
| var flatiron = require('flatiron'), | |
| app = flatiron.app; | |
| console.log('What\'s that in your hand? Look down,'); | |
| app.use(require('./tickets')); | |
| console.log('look up. I HAVE IT. It\'s ' + app.qty + ' TICKETS to ' + app.description + '!'); | |
| console.log('Look again.'); | |
| app.use(require('./diamonds')); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Test App</title> | |
| <script type="text/javascript" src="../lib/es5-shim.js"></script> | |
| <script type="text/javascript" src="../lib/batman.js"></script> | |
| <script type="text/javascript" src="../lib/batman.solo.js"></script> | |
| <script type="text/javascript" src="../lib/extras/batman.rails.js"></script> | |
| <script type="text/javascript" src="../lib/coffee-script.js"></script> | |
| </head> |
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 Author extends Batman.Model | |
| @hasMany 'topics' | |
| @hasMany 'posts' | |
| class Topics extends Batman.Model | |
| @belongsTo 'author' | |
| @hasMany 'posts' | |
| class Post extends Batman.Model | |
| @belongsTo 'author' |
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 Batman.SetTransform extends Batman.Set | |
| constructor: (@source, observedItemKeys..., @transform) -> | |
| super() | |
| @transformIndex = new Batman.SimpleHash | |
| if @source.isObservable | |
| @_setObserver = new Batman.SetObserver(@source) | |
| @_setObserver.observedItemKeys = observedItemKeys | |
| @_setObserver.observerForItemAndKey = @observerForItemAndKey | |
| @_setObserver.on 'itemsWereAdded', @add | |
| @_setObserver.on 'itemsWereRemoved', @remove |
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
| /* | |
| example design of an expandable list view that expands selected items in place using alternate list item view | |
| */ | |
| tasksView: SC.ScrollView.design({ | |
| hasHorizontalScroller: NO, | |
| layout: { top: 24, bottom: 0, left: 0, right: 0 }, | |
| backgroundColor: 'white', | |
| contentView: Tasks.ExpandableListView.design({ | |
| contentBinding: 'Tasks.controller.arrangedObjects', | |
| selectionBinding: 'Tasks.controller.selection', |
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
| require 'thread' | |
| require 'json' | |
| require 'net/http' | |
| require 'uri' | |
| require 'betabrite' | |
| require 'psych' | |
| require 'usb' | |
| class StreamClient | |
| def initialize user, pass |
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
| set transparency=5 | |
| set guioptions=aAce | |
| syntax enable | |
| colorscheme solarized | |
| if has('gui_running') | |
| set background=light | |
| else |
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
| var Job = { | |
| data : [ | |
| "We are glad to see you here. This site is dedicated to", | |
| "poetry and to the people who make poetry possible", | |
| "poets and their readers. FamousPoetsAndPoems.com is", | |
| "a free poetry site. On our site you can find a large", | |
| "collection of poems and quotes from over 631 poets", | |
| "Read and Enjoy Poetry", | |
| "I, too, sing America", |
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
| // http://localhost:5984/addressbook/_design/person/_list/csv/all | |
| // http://localhost:5984/addressbook/_design/person/_list/csv/by_name?reduce=false | |
| function(head, req) { | |
| // log(req) | |
| var viewname = req.path.pop() | |
| var filename = req.info.db_name+'-'+viewname+'.csv' |
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 MyClass | |
| def initialize | |
| @something = true | |
| end | |
| def main | |
| # RUN code | |
| end |