Protect your server with a strong iptables rules and ipset lists.
apt install ipset
#!/usr/bin/env bash | |
ipset -q flush ipsum | |
ipset -q create ipsum hash:net | |
for ip in $(curl --compressed https://raw.githubusercontent.com/stamparm/ipsum/master/ipsum.txt 2>/dev/null | grep -v "#" | grep -v -E "\s[1-2]$" | cut -f 1); do ipset add ipsum $ip; done | |
# Add any IPs here that may not be in the block list yet: | |
ipset add ipsum 110.169.9.43 |
[default] | |
aws_access_key_id=XXXXXXXXXXXXXXXXXXXX | |
aws_secret_access_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
aws_region=us-east-1 |
## template: jinja | |
#cloud-config | |
{% if v1.distro_release == 'focal' %} | |
users: | |
- name: berkant | |
shell: /usr/bin/bash | |
ssh_import_id: gh:berkant | |
sudo: ALL=(ALL:ALL) NOPASSWD:ALL |
set $req_header "";
set $resp_header "";
header_filter_by_lua_block{
local h = ngx.req.get_headers();
for k, v in pairs(h) do
ngx.var.req_header = ngx.var.req_header .. k.."="..v.." ";
# Security enhancements and custom Nginx server header | |
# | |
# Requirements: | |
# $ apt install nginx vim | |
# $ apt install libnginx-mod-http-headers-more-filter | |
# $ vim /etc/nginx/sites-enabled/default | |
# | |
# Further reading http://docs.hardentheworld.org/Applications/Nginx/ | |
# | |
server { |
set -euo pipefail | |
# Reduce backup IO. | |
sed -i -E 's/^\s*#?\s*(ionice:).*/\1 7/' /etc/vzdump.conf | |
sed -i -E 's/^\s*#?\s*(bwlimit:).*/\1 32768/' /etc/vzdump.conf | |
tee /etc/cron.hourly/xfs_fsr <<EOF | |
#!/bin/sh | |
xfs_fsr -t 600 |
Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
### Basic ### | |
# The directory to store the downloaded file. | |
dir=${HOME}/Downloads | |
# Downloads the URIs listed in FILE. | |
input-file=${HOME}/.aria2/aria2.session | |
# Save error/unfinished downloads to FILE on exit. | |
save-session=${HOME}/.aria2/aria2.session | |
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0 | |
save-session-interval=60 | |
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5 |
This gist is an ES module which provides functions to import and export data from an IndexedDB database as JSON. It's based on Justin Emery's indexeddb-export-import
package, but applies some adjustments that reflect better on the current browser landscape (i.e. better developer ergonomics but no support for Internet Explorer).
For each of the provided functionalities, you need a connected IDBDatabase
instance.
import { idb } from 'some-database'