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
$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
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
// 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
STDOUT.sync = true | |
def loadify(message = "", &block) | |
characters = %w[| / - \\ | / - \\] | |
thread = Thread.new do | |
block.call | |
end | |
while thread.alive? |
NewerOlder