This file contains 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
#!/bin/bash | |
NODE="v0.4.11" | |
NVMDIR=~/.nvm | |
NVM=~/.nvm/nvm.sh | |
echo "installing projectman-repl" | |
hash nvm 2>&- || { | |
echo "couldn't find nvm, sourcing from $NVM" | |
test -e $NVM || { | |
echo "couldn't find $NVM -> installing..." |
This file contains 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
// working NodeSSH can be used by installing via npm this http://github.com/outbounder/NodeSSH/tarball/master | |
var SSHClient = require("NodeSSH"); | |
var Expect = require('node-expect'); | |
var password = "password"; | |
var ssh=new SSHClient("host","root", "rootPassword"); | |
parser = new Expect(); | |
parser.debug = 5; |
This file contains 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 formidable = require("formidable"); | |
var fs = require("fs"); | |
var form = new formidable.IncomingForm(), | |
files = [], | |
fields = []; | |
form.uploadDir = __dirname+"/uploads"; | |
form | |
.on('field', function(field, value) { |
This file contains 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
import fabric.main as fab | |
from fabric.api import * | |
def getFabCommand(name): | |
parts = name.split(".") | |
p = parts.pop(0) | |
if p not in fab.commands: | |
return None | |
else: | |
command = fab.commands[p] |
This file contains 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
import java.security.SecureRandom; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; | |
import javax.net.ssl.TrustManager; | |
import javax.net.ssl.X509TrustManager; |
This file contains 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 http = require('http'); | |
var finishedJobs = []; | |
http.createServer(function (request, response) { | |
if(finishedJobs[request.pathname]) { | |
response.writeHead(200, {'Content-Type': 'text/plain'}); | |
response.end(finishedJobs[request.pathname].toString()); | |
} else { | |
response.writeHead(404, {'Content-Type': 'text/plain'}); | |
response.end("Result not found"); |
NewerOlder