openssl genrsa -out rootCA.key 4096openssl req -new -x509 -days 1826 -key rootCA.key -out rootCA.crt| # POST request with cookies | |
| curl \ | |
| --cookie "authId=12345" \ | |
| -X POST \ | |
| -d '{"payload":"DATA"}' \ | |
| -H "Content-Type: application/json" \ | |
| -k https://localhost:8080/ | |
| # Call senecajs action with POST request | |
| curl \ |
CNs are important!!! -days 3650
openssl req -x509 -newkey rsa:4096 -keyout server_key.pem -out server_cert.pem -nodes -days 3650 -subj "/CN=localhost"openssl req -newkey rsa:4096 -keyout admin_key.pem -out admin_csr.pem -nodes -days 3650 -subj "/CN=admin"CNs are important!!! -days 3650
openssl req -newkey rsa:2048 -new -x509 -days 3650 -nodes -subj '/C=US/ST=Massachusetts/L=Bedford/O=Personal/OU=Personal/[email protected]/CN=localhost' -out mongodb-cert.crt -keyout mongodb-cert.keycat mongodb-cert.key mongodb-cert.crt > mongodb.pemCNs are important!!! -days 3650
umask u=rw,go= && openssl req -days 3650 -new -text -nodes -subj '/C=US/ST=Massachusetts/L=Bedford/O=Personal/OU=Personal/[email protected]/CN=localhost' -keyout server.key -out server.csrumask u=rw,go= && openssl req -days 3650 -x509 -text -in server.csr -key server.key -out server.crt| # GitFlow | |
| git checkout develop && git checkout -b _feature-branch_ | |
| git reset --soft _commit-id_ | |
| git commit [-a] [-—amend] [--no-edit] | |
| git fetch origin | |
| git pull --rebase origin develop | |
| git push origin _branch-name_ [-f] | |
| # Reset one commit back |
| #bin/bash | |
| # WARNING!!! | |
| # Check out following lines before run! | |
| # npm settings file | |
| # rm ~/.npmrc | |
| rm -r /usr/local/lib/{node,node_modules} | |
| rm -r /usr/local/include/{node,node_modules} |
| # Splits video to separate scenes files | |
| # Inspired by https://stackoverflow.com/a/38205105 | |
| #!/bin/bash | |
| file="" | |
| out="./" | |
| diff=0.4 | |
| bitrate="512k" | |
| trim=0 |
| # self sign cert for localhost | |
| openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt | |
| # find folder which content's size less than 10kb | |
| find /volume1/Volume/fapfapbackup -mindepth 1 -maxdepth 1 -type d -exec du -ks {} + | awk '$1 <= 10' | cut -f 2- | |
| # Send output to Telegram, JSON POST with curl | |
| # telelog.sh | |
| LOG=`cat <&0` | |
| curl -H "Content-Type: application/json" \ |