Skip to content

Instantly share code, notes, and snippets.

View xopez's full-sized avatar
🎯
Focusing

Xopez xopez

🎯
Focusing
  • Germany
  • 04:25 (UTC +02:00)
View GitHub Profile
@xopez
xopez / choco-autoupdate.ps1
Last active August 31, 2025 07:09
Updater for Chocolatey
# PowerShell Script fuer Chocolatey Auto-Update
param(
[Parameter(Position = 0)]
[string]$Action
)
$ScriptPath = $MyInvocation.MyCommand.Path
$TaskName = "ChocolateyAutoUpdate"
@xopez
xopez / brew-autoupdate.sh
Last active August 30, 2025 18:53
brew autoupdate
#!/bin/bash
# Pfad zu Homebrew (Apple Silicon / Intel)
export PATH="/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SCRIPT_PATH="${SCRIPT_DIR}/$(basename "${BASH_SOURCE[0]}")"
PLIST_DIR="$HOME/Library/LaunchAgents"
PLIST_NAME="com.user.brew-autoupdate.plist"
PLIST_PATH="${PLIST_DIR}/${PLIST_NAME}"
#!/bin/bash
# === Configuration ===
GITHUB_USER="USER"
REPO_NAME="REPO"
BRANCH="main"
LAST_COMMIT_FILE=".last_commit"
# GitHub API URL for the branch
API_URL="https://api.github.com/repos/${GITHUB_USER}/${REPO_NAME}/commits/${BRANCH}"
@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
Last active August 13, 2025 06:41 — 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"