Skip to content

Instantly share code, notes, and snippets.

@rz3n
rz3n / cfmail.py
Last active April 7, 2025 20:49
Script to manage Cloudflare Email Routing rules using the Cloudflare API. Allows to add, list and delete rules. It was created to have an easy way to manage email aliases
#!/usr/bin/env python3
# Simple python script to manage my Cloudflare Email routes via API
# API Documentation: https://developers.cloudflare.com/api/operations/email-routing-routing-rules-list-routing-rules
import requests
import sys
CF_API_TOKEN = "YOUR_CF_API_TOKEN"
CF_ACCOUNT_ID = "YOUR_CF_ACCOUNT_ID"
@rz3n
rz3n / install.ignore.yaml
Last active May 14, 2024 16:28
Dotfiles bootstrap script in Python
---
ignore:
- .git
- .gitignore
- README.md
- install
- install.ignore.yaml
@rz3n
rz3n / Fortigate remote backup
Last active August 24, 2021 20:08
Remote backup for Fortigate using SSH
Simple python script for remotely backup Fortigates using SSH.
The public key must be previously configured in your fortigate.
```
config system admin
edit admin
set ssh-public-key1 "ssh-rsa your-key"
end
end
```
@rz3n
rz3n / myip.js
Last active April 13, 2021 17:41
Cloudflare Workers
/**
* Return your IPv4 or IPv6 address
*/
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
* Respond to the request
@rz3n
rz3n / basic-zshrc
Last active July 8, 2020 16:47
p10k
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export TERM="xterm-256color"
ZSH_THEME="powerlevel10k/powerlevel10k"
POWERLEVEL9K_MODE="nerdfont-complete"
DISABLE_UNTRACKED_FILES_DIRTY="true"