- Forward request IP:
proxy_set_header X-Forwarded-For $remote_addr;
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
printf " | |
\e[1mDocker Network Usage\e[0m | |
\e[3mRunning containers (I/O):\e[0m $(docker stats --format "table {{.NetIO}}" --no-stream | tail -n +2 | sed "s/kB/KB/g" | sed "s/B//g" | cut -d '/' -f1 | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec) / $(docker stats --format "table {{.NetIO}}" --no-stream | tail -n +2 | sed "s/kB/KB/g" | sed "s/B//g" | cut -d '/' -f2 | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec) | |
\e[3mAll containers (I/O):\e[0m $(docker stats --all --format "table {{.NetIO}}" --no-stream | tail -n +2 | sed "s/kB/KB/g" | sed "s/B//g" | cut -d '/' -f1 | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec) / $(docker stats --all --format "table {{.NetIO}}" --no-stream | tail -n +2 | sed "s/kB/KB/g" | sed "s/B//g" | cut -d '/' -f2 | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec) | |
" |
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
/* | |
This has been generated by the overpass-turbo wizard. | |
The original search was: | |
“aminity=*” | |
*/ | |
[out:json]; | |
// gather results | |
( | |
// query part for: “aminity=*” | |
node["amenity"="recycling"]["recycling_type"="centre"]["ownership"!="private"](around:10000,lat,lon); |
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
SELECT | |
TABLE_NAME AS `Table`, | |
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` | |
FROM | |
information_schema.TABLES | |
WHERE | |
TABLE_SCHEMA = 'my_database' | |
ORDER BY | |
(DATA_LENGTH + INDEX_LENGTH) | |
DESC; |
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
set NERDTree | |
set commentary | |
set highlightedyank | |
set ideajoin | |
set surround | |
Plug 'justinmk/vim-sneak' | |
" set scrolloff=5 sidescrolloff=10 | |
" Line number |
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
#!/usr/bin/env bash | |
docker image ls -a | awk -F ' ' '{ print $7 }' | tail +2 | sed 's/B/i/' | numfmt --from=auto | awk '{n += $1}; END{print n}' | numfmt --to=iec-i |
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
(function () { | |
'use strict'; | |
const feedContent = document.querySelector('.feed-content') | |
const feedMain = document.querySelector('.feed-main') | |
const sidebar = document.querySelector('.feed-right-sidebar') | |
feedContent.style.maxWidth = "unset" | |
feedMain.style.maxWidth = "100%" | |
sidebar.style.maxWidth = "unset" |
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
import zlib from 'node:zlib'; | |
import example from './example.json' assert { type: "json" }; | |
const text = JSON.stringify(example); | |
const compressed = zlib.gzipSync(text).toString('base64').replace(/\//g, '_').replace(/\+/g, '-').replace(/=/g, ''); | |
// H4sIAAAAAAAAE-3KsQ2AIBCG0V3-GhPu1ObmsJJQkGBhb2fcXRZggy955Suv7q7Y9qTenkshz74u2YfDLMyHU1_i8Xg8Ho_H4_F4PB6Px-PxeDwejzd99Qd5g3u1cRcAAA |
NewerOlder