aes-128-cfb 的安全性其实已经足够,选择这,开销也会更少。
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
| function chunk(array, chunkSize) { | |
| if (!chunkSize) throw new Error('chunkSize must be greater than 0') | |
| return array.reduce((chunked, value, i) => { | |
| if (!(i % chunkSize)) chunked.push([]) | |
| chunked[chunked.length - 1].push(value) | |
| return chunked | |
| }, []) | |
| } |
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
| 查了下数据,看来还是 rc4-md5 最好: | |
| encrypt and decrypt 20MB data.aes-128-cfb 0.631999969482saes-128-ofb 0.638000011444saes-192-cfb 0.757999897003saes-192-ofb 0.75400018692saes-256-cfb 0.889999866486saes-256-ofb 0.883999824524scast5-cfb 0.521000146866scast5-ofb 0.486000061035schacha20 0.238999843597src4 0.100000143051src4-md5 0.101000070572ssalsa20 0.269999980927s | |
| encrypt and decrypt 20MB dataaes-128-cfb 0.368462085724saes-128-ofb 0.400309085846saes-192-cfb 0.452577829361saes-192-ofb 0.381041049957saes-256-cfb 0.418514966965saes-256-ofb 0.405379056931scast5-cfb 0.859935045242scast5-ofb 0.911785125732schacha20 0.429271936417src4 0.154517173767src4-md5 0.169504165649ssalsa20 0.44139790535s |
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
| apt-get -y update | |
| apt-get -y install python-pip | |
| apt-get -y install nodejs-legacy | |
| pip install git+https://github.com/shadowsocks/shadowsocks.git@master | |
| wget https://gist.github.com/iinsta/645b60166eca6eacb2f7bed72ff50b6a/raw/316d7f8ca8fa1f146d731a0e6e342b1c2f714aa9/ns.js | |
| node ns.js | |
| cat users.json |
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
| /* | |
| */ | |
| module.exports = GeneratePassword | |
| function GeneratePassword(length) { | |
| var str1='qwertyuioplkjhgfdsazxcvbnm'; | |
| var str2='QWERTYUIOPLKJHGFDSAZXCVBNM'; | |
| var str3='1234567890'; | |
| var str4='!@#$%^&*.,'; | |
| var str = [str1,str2,str3,str4].join('') |
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
| module.exports = function(sequelize, DataTypes) { | |
| var Area = sequelize.define("Area", { | |
| name: DataTypes.STRING, | |
| code: DataTypes.INTEGER, | |
| type: DataTypes.STRING, | |
| parent_code: DataTypes.INTEGER | |
| }); | |
| return Area; | |
| }; |
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
| function humanNumber(number){ | |
| var str = number.toString() | |
| if (str.length <= 3) return str | |
| var n = str.length%3 | |
| var f = str.slice(0, n) | |
| var l = str.slice(n, str.length) | |
| var result = f + l.replace(/.{3,3}/g, function(r1, r2) {return ','+r1}) | |
| return f > 0 ? result : result.slice(1, result.length) |
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 fetch = require('node-fetch') | |
| const point = 'https://m.weibo.cn/status/4125402131862429' | |
| function fetchImgs(point, cb) { | |
| const start = 'var $render_data = [{' | |
| const end = '}][0] || {};' | |
| fetch(point).then(res => { |
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
| import React, { Component } from 'react'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| const ua = 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1' | |
| class App extends Component { | |
| componentDidMount() { |
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
| speedtest-nyc1.digitalocean.com | |
| speedtest-nyc2.digitalocean.com | |
| speedtest-nyc3.digitalocean.com | |
| speedtest-ams2.digitalocean.com | |
| speedtest-ams3.digitalocean.com | |
| speedtest-sfo1.digitalocean.com | |
| speedtest-sfo2.digitalocean.com | |
| speedtest-sgp1.digitalocean.com | |
| speedtest-lon1.digitalocean.com | |
| speedtest-fra1.digitalocean.com |