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
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='1em' font-size='100'>📝</text></svg>"> |
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/bash | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install unzip python3-pip python3-dev build-essential libssl-dev libffi-dev xvfb | |
pip3 install --upgrade pip | |
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
locale-gen en_US.UTF-8 |
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
[mysqld] | |
skip-log-bin | |
character-set-server = utf8mb4 | |
collation-server = utf8mb4_unicode_ci | |
skip-character-set-client-handshake | |
# innodb_buffer_pool_size should be about 70% of the ram on db-only servers | |
innodb_buffer_pool_size = 16G | |
max_allowed_packet = 1G |
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
root@xxx:~# df -Th | |
Filesystem Type Size Used Avail Use% Mounted on | |
udev devtmpfs 16G 0 16G 0% /dev | |
tmpfs tmpfs 3.2G 7.8M 3.2G 1% /run | |
/dev/sda3 ext4 137G 36G 96G 28% / | |
tmpfs tmpfs 16G 0 16G 0% /dev/shm | |
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock | |
tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup | |
/dev/sda2 ext4 976M 218M 692M 24% /boot | |
tmpfs tmpfs 3.2G 0 3.2G 0% /run/user/1001 |
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
<input type="url" id="copyLinkInput" value="example.com" /> | |
<button id="copyLinkTrigger">Copy link</button> | |
<script> | |
const copyLinkTrigger = document.getElementById("copyLinkTrigger"); | |
const linkInputElement = document.getElementById("copyLinkInput"); | |
copyLinkTrigger.addEventListener("click", event => { | |
event.srcElement.textContent = "Copied!"; | |
linkInputElement.select(); |
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
<?php | |
$dir = './js/'; | |
// Bundle the JavaScript files in the right order | |
$files = [ | |
'jquery.min.js', | |
'jquery.scrollzer.min.js', | |
'jquery.scrolly.min.js', | |
'util.js', |
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 80; | |
listen 443 ssl; | |
server_name example.com *.example.com; | |
error_log /var/log/nginx/example-com.error.log error; | |
if ($scheme != "https") { | |
return 301 https://$server_name$request_uri; | |
} |
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
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_dhparam /etc/ssl/certs/dhparam2048.pem; | |
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDS$ | |
ssl_session_timeout 1d; | |
ssl_session_cache shared:SSL:50m; | |
ssl_session_tickets off; | |
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
location ~*\.(jpg|jpeg|png|gif|ico|css|js|webp)$ { | |
add_header Cache-Control "public"; | |
expires 365d; | |
log_not_found off; | |
access_log off; | |
} | |
location ~*\.(pdf)$ { | |
add_header Cache-Control "public"; | |
expires 30d; |