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
'use strict'; | |
var iconv = require('iconv-lite'); | |
var exec = require('child_process').exec; | |
var child = exec('dir', function (error, stdout, stderr) { | |
var str = iconv.encode(stdout, 'GBK'); | |
console.log('stdout: ' + str); | |
// 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
<!DOCTYPE html><html><head><meta charset="utf-8"><title>当前</title><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"><style>@import url('https://fonts.googleapis.com/css?family=Roboto:400,700|Inconsolata|Raleway:200');.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-ti |
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
/** | |
* Created by Meteor on 16/8/9. | |
*/ | |
var request = require('request'); | |
request = request.defaults({jar: true, followAllRedirects: true}); | |
// require('request').debug = true; | |
let username = '用户名'; | |
let password = '密码'; |
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
const ALY = require('aliyun-sdk'); | |
var oss = new ALY.OSS({ | |
"accessKeyId": '', | |
"secretAccessKey": '', | |
"endpoint": 'http://oss-us-west-1.aliyuncs.com', | |
"apiVersion": "2013-10-15" | |
}); | |
var redirUrl = oss.getSignedUrl('getObject', { | |
Bucket: 'meteormatt', | |
Key: 'Mac图标.jpg', |
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
{ | |
"Message": "Successful!", | |
"Code": "Success", | |
"Data": { | |
"TotalCount": 1, | |
"HostId": "cn", | |
"PageNum": 1, | |
"PageSize": 20, | |
"Instances": { | |
"Instance": [ |
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
/** | |
* User: meteor | |
* Date: 13-12-27 | |
*/ | |
var request = require('request'); | |
var number = 0; | |
var max_number = 100; | |
function start() { | |
request.post('http://cn.technode.com/chinabang-2014/nominate', |
OlderNewer