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 Home extends Backbone.Controller | |
| actorsView: null | |
| routes: | |
| "": "index" | |
| constructor: -> | |
| super | |
| console.log "Created a new home controller" |
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
| (function() { | |
| window.app.views.ActorsView = Backbone.View.extend({ | |
| id: 'actorsview', | |
| initialize: function() { | |
| return console.log('Initialized a actors view'); | |
| } | |
| }); | |
| }).call(this); |
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 ActorsView extends Backbone.View | |
| window.app.views.ActorsView = Backbone.View.extend | |
| id: 'actorsview' | |
| initialize: -> | |
| #super | |
| console.log 'Initialized a actors view' | |
| #window.app.views.ActorsView = ActorsView |
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 ActorsView extends Backbone.View | |
| id: 'actorsview' | |
| constructor: -> | |
| super | |
| console.log 'Initialized a actors view' | |
| window.app.views.ActorsView = ActorsView |
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
| (function() { | |
| window.app = {}; | |
| app.controllers = {}; | |
| app.collections = {}; | |
| app.models = {}; | |
| app.views = {}; | |
| app.app = {}; | |
| jQuery(function() { | |
| app.home = new app.controllers.Home(); | |
| return Backbone.history.start(); |
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
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express') | |
| , stylus = require('stylus'); | |
| var app = express.createServer(); | |
| // This must be BEFORE other app.use |
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
| $context = stream_context_create(); | |
| $result1 = stream_context_set_option($context, 'ssl', 'local_cert', $certPath); | |
| $result2 = stream_context_set_option($context, 'ssl', 'passphrase', $certPass); | |
| if (!$this->socket = stream_socket_client($target, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $context)) | |
| { | |
| throw new Exception("Error connecting to $target: $errstr (code $errno)"); | |
| } |
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 ids = $(form).find('tr').slice(1).map(function() { | |
| return parseInt($(this).find('td').eq(1).text()); | |
| }); |
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 express = require('express'), | |
| app = express.createServer(), | |
| jam = require('./jam'); | |
| app.set('views', __dirname + '/templates'); | |
| app.set('view engine', 'html'); | |
| app.register('.html', require('ejs')); | |
| app.use(express.static(__dirname + '/public')); | |
| app.use(express.logger()); | |
| app.use(express.bodyParser()); |
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
| describe('When doing this', function() { | |
| it('should be true', function() { | |
| console.log("AAAAAAAAAAAAAAAAAAAA"); | |
| expect(1).toEqual(1); | |
| }); | |
| it('should be true', function() { | |
| expect(1).toEqual(2); | |
| }); | |
| }); |