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 http = require('http'), | |
| httpProxy = require('http-proxy'); | |
| // | |
| // Create a proxy server with custom application logic | |
| // | |
| var proxy = httpProxy.createProxyServer({}); | |
| // | |
| // Create your custom server and just call `proxy.web()` to proxy |
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
| const fs = require('fs'); | |
| const path = require('path'); | |
| let basePath = process.argv[2]||"."; | |
| var data = fs.readFileSync(basePath + "/.picasa.ini", "utf-8"); | |
| let files = data.split("\r\n"); | |
| let fileName = ""; | |
| let starFiles = {}; | |
| files.forEach((line)=> { |
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
| const request = require('request').defaults({jar: true, encoding: null}); | |
| const bodyParser = require('body-parser'); | |
| const app = require('express')(); | |
| app.use(bodyParser.json()); // for parsing application/json | |
| app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded | |
| function proxy(url) { | |
| const headers = { | |
| "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17" |
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
| /** | |
| * created by Tiven Wang on 2017/09/12. | |
| * author: i.tiven.wang@gmail.com | |
| * blog: http://tiven.wang/articles/aliyun-api-signature/ | |
| * homepage: http://tiven.wang | |
| */ | |
| var request = require('request'); | |
| var crypto = require('crypto'); |
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 Promise = require("bluebird"); | |
| var CloudController = { | |
| getInfo: ()=> { | |
| console.log('get infomation'); | |
| return new Promise((reslove, reject)=> { | |
| setTimeout(()=> { | |
| reslove({ | |
| authorization_endpoint: '' | |
| }); |
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 CloudController = { | |
| getInfo: ()=> { | |
| console.log('get infomation'); | |
| return new Promise((reslove, reject)=> { | |
| setTimeout(()=> { | |
| reslove({ | |
| authorization_endpoint: '' | |
| }); | |
| }, 0); | |
| }); |
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 co = require('co'); | |
| var CloudController = { | |
| getInfo: function() { | |
| console.log('get infomation'); | |
| return new Promise(function(reslove, reject) { | |
| setTimeout(function() { | |
| reslove({ | |
| authorization_endpoint: '' | |
| }); |
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 CloudController = { | |
| getInfo: function() { | |
| console.log('get infomation'); | |
| return new Promise(function(reslove, reject) { | |
| setTimeout(function() { | |
| reslove({ | |
| authorization_endpoint: '' | |
| }); | |
| }, 0); | |
| }); |
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
| // Enable component-scanning and auto-configuration with @SpringBootApplication Annotation | |
| // It combines @Configuration + @ComponentScan + @EnableAutoConfiguration | |
| @SpringBootApplication | |
| public class FooApplication { | |
| public static void main(String[] args) { | |
| // Bootstrap the application | |
| SpringApplication.run(FooApplication.class, args); | |
| } | |
| } |
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
| <link rel="import" href="../topeka-elements/theme.html"> | |
| <link rel="import" href="../topeka-elements/topeka-resources.html"> | |
| <link rel="import" href="../topeka-elements/topeka-app.html"> | |
| <link rel="import" href="../topeka-elements/topeka-datasource.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { |
NewerOlder