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
$env:http_proxy="http://127.0.0.1:1081" | |
$env:https_proxy="http://127.0.0.1:1081" | |
# 测试方法 | |
curl -vv http://www.google.com |
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
// Get full chain CA and local CA added by mkcert, so secure TLS can be established | |
const rootCAs = require('ssl-root-cas/latest').create(); | |
rootCAs.addFile(process.env.MKCERT_PATH); | |
require('https').globalAgent.options.ca = rootCAs; |
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
DEBUG=solid:* MKCERT_PATH=\"$(mkcert -CAROOT)/rootCA.pem\" solid start # --root $(pwd)/data --data-browser-path $(pwd)/../node_modules/mashlib/dist/databrowser.html --config-file $(pwd)/../config.solid.example.json | |
// DEBUG=solid:* |
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
worker_processes 4; | |
#定义了nginx对外提供web服务时的worder进程数。最优值取决于许多因素,包括(但不限于)CPU核的数量、存储数据的硬盘数量及负载模式。不能确定的时候,将其设置为可用的CPU内核数将是一个好的开始(设置为“auto”将尝试自动检测它)。 | |
worker_rlimit_nofile 100000; | |
#更改worker进程的最大打开文件数限制。如果没设置的话,这个值为操作系统的限制。设置后你的操作系统和Nginx可以处理比“ulimit -a”更多的文件,所以把这个值设高,这样nginx就不会有“too many open files”问题了。 | |
events { | |
worker_connections 4096; | |
#设置可由一个worker进程同时打开的最大连接数。如果设置了上面提到的worker_rlimit_nofile,我们可以将这个值设得很高。记住,最大客户数也由系统的可用socket连接数限制(~ 64K),所以设置不切实际的高没什么好处。 |
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
export function useScene( | |
canvasRef: React.RefObject<HTMLCanvasElement>, | |
cameraRef: React.MutableRefObject<Camera | undefined>, | |
currentAirplaneObject, | |
currentDetectedPointObjects: Mesh[], | |
) { | |
// set up scene and model | |
const sceneRef = useRef<Scene>(); | |
useEffect(() => { | |
// 如果这个 Effect 被调用了,说明场景需要刷新 |
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
/** slug field: let parent folder create a resource named ${slug} */ | |
const slug = basename(url); | |
const parentFolder = dirname(pathName); | |
const parentUrl = `https://${hostName}${parentFolder}`; | |
/** link field: links saparated by comma, and key-value saparated by semicolon; | |
* type means the suggested content-type, describedby means the suggested meatdata file | |
*/ | |
const link = `<http://www.w3.org/ns/ldp#Resource>; rel="type", <${slug}.meta>; rel="describedby"`; |
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 zipResults = _.flow([_.zip, _.flatten, _.compact]); |
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
fetch(`http://localhost:${env.ankiPort || 8765}`, { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ action: 'addNote', version: 6, params }), | |
}).catch(error => { | |
pluginContext.console.log('error', 'failed adding to anki', { error, errorString: String(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
const xxx = require('./xxx'); | |
module.exports = xxx; |
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
{ | |
"hotkey": "alt+space", | |
"theme": "linonetwo/zazu-light-theme", | |
"displayOn": "detect", | |
"blur": false, | |
"plugins": [ | |
{ | |
"name": "linonetwo/zazu-clipboard", | |
"variables": { | |
"ClipboardKey": "ctrl+v" |
NewerOlder