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 'dart:js' as js; | |
//OR | |
import 'dart:html' as html; | |
onPressed: () { | |
js.context.callMethod('open', ['https://play.google.com/store']); | |
//OR | |
html.window.open('https://play.google.com/store', 'new tab'); | |
}, |
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
// Usage: USER=user PASSWORD=pw TARGET=http://localhost:3838 PORT=8080 node proxy.js | |
var http = require('http'), | |
auth = require('basic-auth'), | |
httpProxy = require('http-proxy'); | |
var proxy = httpProxy.createProxyServer({}); | |
var server = http.createServer(function(req, res) { | |
var credentials = auth(req) |
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
/** | |
* This code is licensed under the terms of the MIT license | |
* | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { |
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 connect = require('connect'), | |
httpProxy = require('http-proxy'), | |
domain = process.env.DOMAIN, | |
port = process.env.PORT || 3000; | |
var proxy = new httpProxy.RoutingProxy(); | |
connect.createServer() | |
.use('/api', function (req, res) { | |
req.headers.host = domain; | |
proxy.proxyRequest(req, res, { host: domain, port: 80 }); |
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 request = require('request'), | |
querystring = require('querystring'); | |
var Note = function(key){ | |
this.key = key; | |
} | |
Note.prototype = new process.EventEmitter(); | |
var SimpleNote = function(email, passwd){ | |
this.email = email; |