Skip to content

Instantly share code, notes, and snippets.

View harbhub's full-sized avatar

Michael Harbach harbhub

View GitHub Profile
@IBOutlet var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
let url = NSURL(string: "https://www.google.com/")
let requestObject = NSURLRequest(URL: url!)
webView.loadRequest(requestObject)
}
ASPX
<div>Testing <%= myString %> Testing</div>
C#
using...;
public partial class TelerikWebForm : System.Web.UI.Page
{
public string myString = "Success";
}
//Step One: I already have this string, which I retrieved from the SQL database
string listOfRecipients = "abc@some.com,john@doe.net";
//Step Two
Array arrayOfRecipients = listOfRecipients.Split(",");
//Step Three
int i = 0;
//Somehow I need to get this:
/*
process.env.harbachi = {};
console.log(JSON.stringify(process.env.harbachi));//"[object Object]"
process.stdout.write(JSON.stringify(process.env.harbachi));//"[object Object]"
var exec = require('child_process').exec,
child;
child = exec('ls',
function (error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
//server.js
var speech = require('google-speech-api');
speech({'file': '/test.wav'}, function (err, results) {
if (err) throw err;
console.log(results);
// [{status: 0, id: '...', hypotheses: [{utterance: 'this is a test', confidence: 0.9162679}]}]}]
});
//test.wav
C:\Users\mike>cd harb
C:\Users\mike\harb>jitsu deploy
info: Welcome to Nodejitsu harbhub
info: jitsu v0.11.7, node v0.8.14
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in servant.js
WARN package.json harbhub@0.0.0-25 No README.md file found!
info: Creating snapshot 0.0.0-25
Support for name-based virtual servers
From the application protocol point of view, TLS belongs to a lower layer, although the TCP/IP model is too coarse to show it. This means that the TLS handshake is usually (except in the STARTTLS case) performed before the application protocol can start. The name-based virtual server feature being provided by the application layer, all co-hosted virtual servers share the same certificate because the server has to select and send a certificate immediately after the ClientHello message. This is a big problem in hosting environments because it means either sharing the same certificate among all customers or using a different IP address for each of them.
There are two known workarounds provided by X.509:
If all virtual servers belong to the same domain, a wildcard certificate can be used. Besides the loose host name selection that might be a problem or not, there is no common agreement about how to match wildcard certificates. Different rules are applied depending on the ap
var form = new formidable.IncomingForm();
var fields = [];
var files = [];
form.uploadDir = __dirname+'/tmp';
form
.on('field', function(field, value) {
log(field,value);
})
<form action='/post' method="post">
<label for="POST-name">Post Name:</label>
<input id="POST-name" type="text" name="name">
<input id='POST-filename-upload' type='file' multiple='multiple'>
<input type="submit" value="Save">
</form>