Skip to content

Instantly share code, notes, and snippets.

@dduvnjak
dduvnjak / add_cloudflare_ips.sh
Last active August 8, 2025 10:19
Add CloudFlare IP addresses to an EC2 Security Group using awscli
# first we download the list of IP ranges from CloudFlare
wget https://www.cloudflare.com/ips-v4
# set the security group ID
SG_ID="sg-00000000000000"
# iterate over the IP ranges in the downloaded file
# and allow access to ports 80 and 443
while read p
do
@paperclip
paperclip / autodeploy.sh
Last active August 21, 2025 15:41
Talpa autodeploy script
#!/bin/bash
set -o pipefail
[[ -n "$WORKING_DIR" ]] || WORKING_DIR="$1"
[[ -n "$WORKING_DIR" ]] || WORKING_DIR=$(pwd)
function failure()
{
echo "$@"