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
* git branch -a | |
* git ls-files | |
* git diff <branchA> <branchB> -- <file> | |
* git diff CI_CD remote_data -- | |
git ls-files | grep -vE "yarn\.lock|package-lock\.json" | xargs -L1 -d '\n' git --no-pager diff remotes/origin/remote_data remotes/origin/CI_CD -- >> diff.diff | |
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
magick convert 2.png -crop 1152x1584 +repage 2.meta-coin.pdf |
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 json | |
import logging | |
import boto3 | |
from botocore.exceptions import ClientError | |
from botocore.client import Config | |
import os | |
import urllib.parse | |
""" | |
Example CURL, need put and file: |
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 ns=NAMESPACE # Change this | |
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" | |
for n in $(kubectl -n $ns get -o=name pvc,configmap,serviceaccount,secret,ingress,service,deployment,statefulset,hpa,job,cronjob) | |
do | |
echo "Exporting $n..." | |
mkdir -p $(dirname $n) | |
# old # kubectl get -o=yaml --export $n > $n.yaml | |
kubectl -n $ns get $n -o yaml | kubectl-neat > $n.yaml |
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
if [ -z $1 ] || [ -z $2 ] | |
then | |
echo "Usage: [node file] [output svg]" | |
exit 1 | |
fi | |
# https://www.brendangregg.com/blog/2014-09-17/node-flame-graphs-on-linux.html | |
# https://nodejs.org/en/docs/guides/diagnostics-flamegraph/ | |
sudo perf record -e cycles:u -g -- node --interpreted-frames-native-stack --perf-basic-prof-only-functions "$1" |
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
c:\OpenSSL-Win64\bin\openssl.exe pkcs12 -in ???.pfx -out private+cert.pem -nodes | |
c:\OpenSSL-Win64\bin\openssl.exe pkcs7 -text -out chain.pem -print_certs -in <PKCSfile>.p7b | |
show cert | |
c:\OpenSSL-Win64\bin\openssl.exe s_client -connect www.google.com:443 | |
for /F "delims=" %a in ('dir /b /s "*.pfx"') do echo %a | |
for /F "delims=" %a in ('dir /b /s "*.pfx"') do c:\OpenSSL-Win64\bin\openssl.exe pkcs12 -in %a -out %a_private+cert.pem -nodes |
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
global | |
pidfile /var/run/haproxy.pid | |
log 127.0.0.1 local0 info | |
ulimit-n 65536 | |
defaults | |
mode http | |
clitimeout 600000 # maximum inactivity time on the client side | |
srvtimeout 600000 # maximum inactivity time on the server side |
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
@media screen and (max-width: 800px) { | |
.ant-modal-mask { | |
animation-duration: 0s !important; /* fade */ | |
} | |
.ant-modal-content { | |
height: 100%; | |
} | |
.ant-modal { |
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
cat nginx_logs.txt // (docker logs with timestamps, so first col ($1) is time) | |
| tr -cd '\11\12\15\40-\176' // filter non ascii from bot requests | |
| grep "/202" // get rows with time like Apr/2021 or Jul/2020 | |
| grep 'qp.png' // get rows which will called once per real user | |
| awk '{split($5,a,":"); print a[1] "\t" $2}' // print time of day and ip | |
| uniq -c | |
| sort -rn | |
| awk '{arr[$2]+=1} END {for (i in arr) {print substr(i,2),arr[i]}}' // Group IPs per day |
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
MJPEG (Video only without sound): | |
http://<user>:<B64 Pass>@10.0.0.11:8080/stream/video/mjpeg | |
WAV (sound only): | |
http://admin:YWRtaW4=@MYIP:8080/stream/audio/wavpcm | |
JPEG Snapshot (slower interval than MJPEG): | |
http://10.0.0.11:8080/stream/snapshot.jpg |