Skip to content

Instantly share code, notes, and snippets.

@Ceelog
Last active October 25, 2023 22:06
  • Star 53 You must be signed in to star a gist
  • Fork 31 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Ceelog/39862d297d9c85e743b3b5111b7d44cb to your computer and use it in GitHub Desktop.
{"lastUpload":"2020-04-30T04:17:22.471Z","extensionVersion":"v3.4.3"}
[
{
"metadata": {
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd",
"publisherId": "Shan.code-settings-sync",
"publisherDisplayName": "Shan"
},
"name": "code-settings-sync",
"publisher": "Shan",
"version": "3.4.3"
},
{
"metadata": {
"id": "26a529c9-2654-4b95-a63f-02f6a52429e6",
"publisherId": "zhuangtongfa.material-theme",
"publisherDisplayName": "zhuangtongfa"
},
"name": "material-theme",
"publisher": "zhuangtongfa",
"version": "3.3.1"
},
{
"metadata": {
"id": "93ce222b-5f6f-49b7-9ab1-a0463c6238df",
"publisherId": "ms-vscode-remote.remote-containers",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-containers",
"publisher": "ms-vscode-remote",
"version": "0.112.0"
},
{
"metadata": {
"id": "607fd052-be03-4363-b657-2bd62b83d28a",
"publisherId": "ms-vscode-remote.remote-ssh",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-ssh",
"publisher": "ms-vscode-remote",
"version": "0.51.0"
},
{
"metadata": {
"id": "bfeaf631-bcff-4908-93ed-fda4ef9a0c5c",
"publisherId": "ms-vscode-remote.remote-ssh-edit",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-ssh-edit",
"publisher": "ms-vscode-remote",
"version": "0.51.0"
},
{
"metadata": {
"id": "f0c5397b-d357-4197-99f0-cb4202f22818",
"publisherId": "ms-vscode-remote.remote-wsl",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-wsl",
"publisher": "ms-vscode-remote",
"version": "0.44.2"
},
{
"metadata": {
"id": "b5eaebe8-c8c7-495a-80c5-3ba4a7a91c35",
"publisherId": "andischerer.theme-atom-one-dark",
"publisherDisplayName": "andischerer"
},
"name": "theme-atom-one-dark",
"publisher": "andischerer",
"version": "0.0.1"
},
{
"metadata": {
"id": "829a192d-496c-44ac-87f3-0a84ce36a853",
"publisherId": "emmanuelbeziat.vscode-great-icons",
"publisherDisplayName": "emmanuelbeziat"
},
"name": "vscode-great-icons",
"publisher": "emmanuelbeziat",
"version": "2.1.47"
},
{
"metadata": {
"id": "9ccc1dd7-7ec4-4a46-bd4f-7d7b8b9d322a",
"publisherId": "vscode-icons-team.vscode-icons",
"publisherDisplayName": "vscode-icons-team"
},
"name": "vscode-icons",
"publisher": "vscode-icons-team",
"version": "10.1.1"
},
{
"metadata": {
"id": "e4ee7751-6514-4731-9cdb-7580ffa9e70b",
"publisherId": "MS-CEINTL.vscode-language-pack-zh-hans",
"publisherDisplayName": "MS-CEINTL"
},
"name": "vscode-language-pack-zh-hans",
"publisher": "MS-CEINTL",
"version": "1.44.2"
},
{
"metadata": {
"id": "414b2873-c80e-4dc6-9031-bd185cfb3944",
"publisherId": "william-voyek.vscode-nginx",
"publisherDisplayName": "william-voyek"
},
"name": "vscode-nginx",
"publisher": "william-voyek",
"version": "0.7.2"
},
{
"metadata": {
"id": "23d72dfc-8dd1-4e30-926e-8783b4378f13",
"publisherId": "ms-vscode-remote.vscode-remote-extensionpack",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "vscode-remote-extensionpack",
"publisher": "ms-vscode-remote",
"version": "0.20.0"
}
]
{
"agentPort": 33895,
"osReleaseId": "centos",
"arch": "x86_64",
"webUiAccessToken": "",
"sshAuthSock": "",
"tmpDir": "/run/user/0",
"platform": "linux",
"pid": 65426,
"ipcHandlePath": "/var/folders/9t/jnlm057n1fs4kvg005_0l9xr0000gn/T/vscode-ssh-askpass-4938bb89880a3c5080126cdc629310075a0d5328.sock",
"socksPort": 53814,
"startupTime": 1588218230104
}
{
"agentPort": 43796,
"osReleaseId": "centos",
"arch": "x86_64",
"webUiAccessToken": "",
"sshAuthSock": "",
"tmpDir": "/run/user/0",
"platform": "linux",
"pid": 65527,
"ipcHandlePath": "/var/folders/9t/jnlm057n1fs4kvg005_0l9xr0000gn/T/vscode-ssh-askpass-c0cc698581744f7039d9fabf35293642059affbc.sock",
"socksPort": 53825,
"startupTime": 1588218238647
}
{
"window.zoomLevel": 0,
"workbench.iconTheme": "vscode-great-icons",
"editor.fontSize": 16,
"vsicons.dontShowNewVersionMessage": true,
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false,
"suppressResultsExplorerNotice": false,
"suppressShowKeyBindingsNotice": true
},
"gitlens.codeLens.authors.enabled": false,
"gitlens.codeLens.recentChange.enabled": false,
"gitlens.currentLine.enabled": false,
"gitlens.statusBar.enabled": false,
"workbench.statusBar.feedback.visible": false,
"php.suggest.basic": false,
"workbench.colorTheme": "Atom One Dark",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.printWidth": 1024,
"todo-tree.highlights.enabled": true,
"[php]": {
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
},
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"php-cs-fixer.executablePath": "${extensionPath}/php-cs-fixer.phar",
"php-cs-fixer.lastDownload": 1588051228981,
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"java.errors.incompleteClasspath.severity": "ignore",
"vs-kubernetes": {
"vs-kubernetes.knownKubeconfigs": [
"/root/.kube/pre.thanos.config"
],
"vs-kubernetes.kubeconfig": "/root/.kube/pre.thanos.config",
"vs-kubernetes.minikube-path": "/root/.vs-kubernetes/tools/minikube/linux-amd64/minikube",
"vs-kubernetes.helm-path": "/root/.vs-kubernetes/tools/helm/linux-amd64/helm",
"vs-kubernetes.draft-path": "/root/.vs-kubernetes/tools/draft/linux-amd64/draft"
},
"todo-tree.tree.showScanModeButton": false,
"files.associations": {
"*.tpl": "html"
},
"extensions.ignoreRecommendations": false,
"git.ignoreLegacyWarning": true,
"terminal.integrated.shell.osx": "/bin/zsh",
"rust-client.rustupPath": "~/.cargo/bin/rustup",
"sync.gist": "39862d297d9c85e743b3b5111b7d44cb"
}
{
/*
// Place your snippets for PHP here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
}
@itbdw
Copy link

itbdw commented Jul 17, 2017

Thanks so much. I made a ip_whitelist version. Hope anyone may be helped.
https://gist.github.com/itbdw/bc6c03f754cc30f66b824f379f3da30f

@userid
Copy link

userid commented May 7, 2019

It may make a small fix :
when redis connecton error , "last_update_time" also needs to be updated anyway, or, nginx will try to connect to redis by every request.

@Airy301
Copy link

Airy301 commented Apr 24, 2020

It may make a small fix :
when redis connecton error , "last_update_time" also needs to be updated anyway, or, nginx will try to connect to redis by every request.

I am nowise to Lua Script but I can see that this issue is resolved at line 71 and this script is not connecting to redis on each request. Yet I wanted to be sure that this issue is really solved. So, is it solved now?

@Airy301
Copy link

Airy301 commented Apr 24, 2020

I am nowise to Lua but I think I found some possible errors and updates

  1. You have set local redisconnectiontimeout = 100 at line 34 while to update with variable you have called red:set_timeout(redisconnecttimeout);. Please note the difference between words connection/connect in both variables.

  2. A return call should be made if connection was not successful at line 58 otherwise it can possibly go to if condition of ip_blacklist:get(ip)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment