# OpenSSH
# 运行后,要求用户提供密钥文件名
# 然后在当前目录生成两个密钥文件:id_rsa(私钥)和id_rsa.pub(公钥)
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
# OpenSSL
# 生成私钥,然后生成公钥
$ openssl genrsa -out private_key.pem 4096
$ openssl rsa -pubout -in private_key.pem -out public_key.pem
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
data:text/html, <html style="background-color:FFFFCC;"><title>Editor</title><textarea style="margin:0;padding:0;font-size: 1.5em; background-color:FFFFCC;width: 100%; height: 100%; border: none; outline: none" placeholder="Use Ctrl+S to save ..." autofocus /> |
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
http://94.228.192.98/announce | |
http://anisaishuu.de:2710/announce | |
http://bigfoot1942.sektori.org:6969/announce | |
http://bt2.careland.com.cn:6969/announce | |
http://exodus.desync.com/announce |
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
.dance | |
.democrat | |
.rich | |
.farm | |
.guru | |
.codes | |
.sale | |
.video | |
.garden | |
.fashion |
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 a(x,y){ | |
y = function() { x = 2; }; | |
return function(){ | |
var x = 3; | |
y(); | |
console.log(x); | |
}.apply(this, arguments); | |
} | |
a(); |
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 require(p){ | |
var path = require.resolve(p) | |
, mod = require.modules[path]; | |
if (!mod) throw new Error('failed to require "' + p + '"'); | |
if (!mod.exports) { | |
mod.exports = {}; | |
mod.call(mod.exports, mod, mod.exports, require.relative(path)); | |
} | |
return mod.exports; | |
} |
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 queuedObservers = new Set(); | |
const observe = fn => queuedObservers.add(fn); | |
const observable = obj => new Proxy(obj, {set}); | |
function set(target, key, value, receiver) { | |
const result = Reflect.set(target, key, value, receiver); | |
queuedObservers.forEach(observer => observer()); | |
return result; |
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 map = (array, func) => ( | |
array.map(func) | |
); | |
const flatMap = (array, func) => ( | |
array.reduce((result, element) => ( | |
result.concat(func(element)) | |
), []) | |
); |
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
// 情况一 | |
let str = 'outer'; | |
function foo(x = () => str) { | |
let str = 'inner'; | |
console.log(x()); // outer | |
} | |
foo(); |
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
let x = 99; | |
function foo(p = x + 1) { | |
console.log(p); | |
} | |
foo() // 100 | |
x = 100; | |
foo() // 101 |
OlderNewer