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
@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) | |
} |
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 Bluebird = require('bluebird'); | |
var redis = require('redis'); | |
var _ = require('lodash'); | |
function getSet(key, transmute){ | |
return new Bluebird(function(resolve, reject){ | |
function setAtomic(key, count){ | |
var counts = count; | |
// create a UNIQUE CLIENT CONNECTION for this process |
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
ASPX | |
<div>Testing <%= myString %> Testing</div> | |
C# | |
using...; | |
public partial class TelerikWebForm : System.Web.UI.Page | |
{ | |
public string myString = "Success"; | |
} |
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
//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: | |
/* |
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
process.env.harbachi = {}; | |
console.log(JSON.stringify(process.env.harbachi));//"[object Object]" | |
process.stdout.write(JSON.stringify(process.env.harbachi));//"[object Object]" |
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 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); | |
} |
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
//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 |
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
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 |
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
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 |
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 form = new formidable.IncomingForm(); | |
var fields = []; | |
var files = []; | |
form.uploadDir = __dirname+'/tmp'; | |
form | |
.on('field', function(field, value) { | |
log(field,value); | |
}) |
NewerOlder