Skip to content

Instantly share code, notes, and snippets.

@alpody
alpody / dmesg
Created November 14, 2018 09:36
Dmesg settings console output on/off
#Off output
dmesg -D
#on output
dmesg -E
@alpody
alpody / sh
Created May 27, 2021 19:45
get list fil in ./jobs/1/income/ and check it occurance in ./jobs/1/data.html file
find ./jobs/1/docs/income -type f -print | while read filename ; do a=$(echo $filename | sed 's@./jobs/1/docs/income/@@'); grep $a ./jobs/1/data.html ; done | wc -l
docker run --rm -v /home/mypictures:/home bperel/terminalimageviewer -256 myimage.png
@alpody
alpody / cors.js
Last active November 9, 2021 11:51
Allow access for json-server from any origins
module.exports = (req, res, next) => {
res.header('Access-Control-Allow-Origin', '*')
res.header('Access-Control-Allow-Method','GET HEAD PUT PATCH POST DELETE')
res.header('Access-Control-Allow-Headers', 'Origin,Content-Type,Accept,Authorization')
res.header('Vary', 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers')
next()
}
@alpody
alpody / haproxy_rate_limiting.md
Created July 14, 2022 08:05 — forked from procrastinatio/haproxy_rate_limiting.md
Rate limiting with HAproxy

Introduction

So HAProxy is primalery a load balancer an proxy for TCP and HTTP. But it may act as a traffic regulator. It may also be used as a protection against DDoS and service abuse, by maintening a wide variety of statistics (IP, URL, cookie) and when abuse is happening, action as denying, redirecting to other backend may undertaken ([haproxy ddos config], [haproxy ddos])

@alpody
alpody / vs_buildtools_dl_list.md
Created October 15, 2024 09:17 — forked from Mr-Precise/vs_buildtools_dl_list.md
MSVC / VS / Buildtools download link collection list