This file contains hidden or 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
| ffmpeg -i input.flv -c:v h264_nvenc -c:a copy -rc constqp -qp 28 output.mp4 |
This file contains hidden or 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
| sentence.replace(/(a|u|e|o)/gi, (letter) => letter.toLowerCase() === letter ? 'i' : 'I') |
This file contains hidden or 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
| server { | |
| listen 443 ssl http2; | |
| server_name yourdomain.tld www.yourdomain.tld; | |
| ssl_certificate /etc/nginx/tls.d/yourdomain.tld.crt; | |
| ssl_certificate_key /etc/nginx/tls.d/yourdomain.tld.key; | |
| ssl_session_cache shared:yourdomain:10m; | |
| ssl_protocols TLSv1.2 TLSv1.3; | |
| ssl_prefer_server_ciphers on; | |
| ssl_stapling on; |
This file contains hidden or 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
| python -m smtpd -c DebuggingServer -n 0.0.0.0:1025 |
This file contains hidden or 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
| curl -s -L https://wordpress.org/latest.tar.gz | tar -xzC /path/to/your/wordpress-site --strip-components 1 |
This file contains hidden or 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
| #!/bin/sh | |
| # THIS SCRIPT IS INTENDED FOR ROLLING RELEASE DISTRO USERS. | |
| # Sometimes my local libraries didn't work after upgrading my Python, so I decided to write this helper script. | |
| # | |
| # Usage: | |
| # venv_upgrade [options] | |
| # | |
| # Options: | |
| # -h, --help Show this help message. | |
| # -p, --path Path to your virtualenv. |
This file contains hidden or 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
| #!/bin/env python | |
| import logging | |
| import os | |
| from lxml.etree import iterparse, tostring | |
| def split_xml(xml_source, rows_per_file, output_dir): | |
| """ | |
| Splits an XML file into multiple files. |
This file contains hidden or 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
| // dbUrl example: mongodb://user:pass@127.0.0.1/MyDB?authsource=admin | |
| const getDatabaseName = (dbUrl) => url.parse(dbUrl).pathname.substring(1); |
This file contains hidden or 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
| openssl dhparam -dsaparam -out ./dhparam.pem 4096 |
This file contains hidden or 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
| # Ubuntu & Debian | |
| # Store this file as /etc/apt/apt.conf.d/100-nginx-post-update | |
| DPkg::Post-Invoke {"/usr/local/bin/ngx_brotli"; }; |