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
| STDOUT.sync = true | |
| def loadify(message = "", &block) | |
| characters = %w[| / - \\ | / - \\] | |
| thread = Thread.new do | |
| block.call | |
| end | |
| while thread.alive? |
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
| // Bootstrap routes | |
| fs.readdir(__dirname + '/routes', function(err, files){ | |
| if (err) throw err; | |
| files.forEach(function(file){ | |
| require('./routes/' + file.replace('.js',''))(app); | |
| }); | |
| }); |
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
| form#form1(action='/form', method='post') | |
| input(type="text",name="user[name]") | |
| input(type="text",name="user[email]") | |
| input(type='submit', value='Submit') | |
| script(type='text/javascript') | |
| $(function() { | |
| $('#form1').submit(function(e){ | |
| $(this).invoke().success(function(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
| $baseline: 20px; | |
| $gutter: 20px; | |
| $module-width: 60px; | |
| $module-height: $baseline * 3; | |
| @function width($n) { | |
| @return $n * $gutter; | |
| } | |
| @function height($n) { |
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 client = new Pubsub({ | |
| port: 8000 | |
| }); | |
| client.connect(); | |
| client.on("connect", function() { | |
| client.subscribe("trololo", function(data){ | |
| console.log('Received a message from the server: ' + 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
| var Jade = {}; | |
| Jade.template = function(templateString) { | |
| var jade = require('jade'); | |
| return function() { | |
| return jade.render(templateString, { | |
| locals: arguments[0] | |
| }); | |
| }; |
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(){ | |
| $.yql('select * from geo.places where text="Orlando"', function(response){ | |
| console.log(response); | |
| }) | |
| }); |
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 MongoModel = Backbone.Model.extend({ | |
| idAttribute: "_id" | |
| }); |
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
| bundle exec rails server | |
| bundle exec rake db:migrate | |
| ... |
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
| $(this.el).one("remove", function(){ | |
| console.log("Yeah!!!!!!! I can subscribe on view remove"); | |
| }); |
OlderNewer