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
port = 8000 | |
appPort = 3000 | |
server = share.madeye.io | |
ssh_cmd = "ssh -v -tt -N -R #{port}:127.0.0.1:#{@appPort} -o StrictHostKeyChecking=no ubuntu@#{server}" | |
# console.log "COMMAND", ssh_cmd | |
exec ssh_cmd, (error, stdout, stderr) -> | |
console.log "ERROR", error | |
console.log "STDOUT", stdout | |
console.log "STDERR", stderr |
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 net = require("net"); | |
var socket = net.connect({port: 5858}); | |
socket.on("data", function(data){ | |
console.log("received data", data.toString()); | |
// socket.end(); | |
}); | |
socket.on("end", function(data){ | |
console.log("client disconnected"); |
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
fs = require("fs"); | |
var Handlebars = {}; | |
/* Our format: | |
* | |
* A 'template' is an array. Each element in it is either | |
* - a literal string to echo | |
* - an escaped substition: ['{', invocation] | |
* - an unescaped substition: ['!', invocation] | |
* - a (conditional or iterated) block: |
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
Package.describe({ | |
summary: "Processing, a package." | |
}); | |
Package.on_use(function (api) { | |
api.add_files(["processing-1.4.1.min.js"], "client"); | |
}); |
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
casper.start url, -> | |
projectNameHTML = @getHTML "#projectName" | |
projectNameMatches = /my-project/.test(projectNameHTML) | |
@test.assert projectNameMatches, "project name matches my-project" | |
@test.assertTitle "Project Home" | |
result = @capture("screenshot.png") |
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
@wait 2000, -> | |
@test.assertExists "#projectName" | |
projectNameHTML = @getHTML "#projectName" | |
projectNameMatches = /new-project/.test(projectNameHTML) | |
@test.assert projectNameMatches, "project name matches fake-project" |
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
<script src="http://twitter.github.com/hogan.js/builds/2.0.0/hogan-2.0.0.js"></script> | |
<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script> | |
<form> | |
<h3>Javascript</h3> | |
<textarea id="javascript" rows="8" cols="80">var x = {name: "sample text"}</textarea> | |
<h3>Mustache</h3> | |
<textarea id="mustache" rows="8" cols="80">{{name}}</textarea> | |
</form> |
NewerOlder