Skip to content

Instantly share code, notes, and snippets.

View xopez's full-sized avatar
🎯
Focusing

Sascha Moser xopez

🎯
Focusing
  • dacoso GmbH
  • Germany
  • 20:57 (UTC +02:00)
View GitHub Profile
@xopez
xopez / gist:8ab32ec91faad1f3ee2be37a384b7d55
Created May 20, 2021 18:17
nginx snippet for anonymized log
map $remote_addr $remote_addr_anon {
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
~(?P<ip>[^:]+:[^:]+): $ip::;
default 0.0.0.0;
}
log_format combined_ssl '$remote_addr_anon - $remote_user [$time_local] '
'$ssl_protocol/$ssl_cipher '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
@xopez
xopez / README.md
Created April 6, 2021 20:22 — forked from Log1x/README.md
Uptime Robot Discord Webhook

Uptime Robot Webhook for Discord

Screenshot

Configuration

  • Alert Contact Type: Web-Hook
  • URL to Notify: https://discordapp.com/api/webhooks/CHANGEME/CHANGEME?
    • Must end with ?
### Keybase proof
I hereby claim:
* I am xopez on github.
* I am xopez (https://keybase.io/xopez) on keybase.
* I have a public key ASAuR4rT_2NUBAhZdrY9Ac8awbB7eT9K8Whg81V2klT1IQo
To claim this, I am signing this object:
@xopez
xopez / cdnjs.sh
Created March 6, 2021 13:29
cdnjs downloader
#!/usr/bin/env bash
command_exists() {
command -v "$@" >/dev/null 2>&1
}
TARGET_PATH="$PWD"
OWNER=$(id -u)
REQUIRED_PACKAGES="curl jq"