npm init -y
Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.
# Place this file inside /etc/nginx/conf.d/server-includes/ | |
location @httpd_fallback { | |
proxy_pass $scheme://$CPANEL_APACHE_PROXY_REQ_IP:$CPANEL_APACHE_PROXY_REQ_PORT; | |
} | |
location ~ \.(gif|jpg|jpeg|png|css|js|svg|webm|webp)$ { | |
expires 30d; | |
add_header Vary Accept-Encoding; | |
access_log off; |
# Ubuntu & Debian | |
# Store this file as /etc/apt/apt.conf.d/100-nginx-post-update | |
DPkg::Post-Invoke {"/usr/local/bin/ngx_brotli"; }; |
openssl dhparam -dsaparam -out ./dhparam.pem 4096 |
// dbUrl example: mongodb://user:[email protected]/MyDB?authsource=admin | |
const getDatabaseName = (dbUrl) => url.parse(dbUrl).pathname.substring(1); |
#!/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. |
#!/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. |
curl -s -L https://wordpress.org/latest.tar.gz | tar -xzC /path/to/your/wordpress-site --strip-components 1 |
python -m smtpd -c DebuggingServer -n 0.0.0.0:1025 |
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; |