Skip to content

Instantly share code, notes, and snippets.

View sassyn's full-sized avatar

Sassy Natan sassyn

  • Israel
View GitHub Profile
sassyn /
Created June 26, 2021 18:13 — forked from fabidick22/
Migrate AWS ECR images from one account to another in different regions
import docker
import sys
import boto3 as b3
ECR_URI = "{}.dkr.ecr.{}{}"
TAG_URI = "{}:{}"
class Repository:
def __init__(self, repository_name: str, region: str, account_id: str, specific_tag=None, profile="default"):
sassyn /
Created June 8, 2021 14:18 — forked from kntyskw/
Script to enable IP multicast without using Ethernet broadcast. It uses tc mirred and pedit actions to copy and edit an IP multicast packet to send over multiple Ethernet unicast frames. It requires two network interfaces to work. One is the interface to grab original multicast packets from and the other is to send out modified packets. This is …
[[ -n "$1" && -n "$2" ]] || { echo "Usage: $0 <interface to grab multicast packets from> <interface to send modified packets to> [target MAC address 1] [target MAC address 2] ..."; exit 0 ; }
SRC_MACADDR=`ip link show $OIF | awk '/ether/ {print $2}' | tr -d :`
sassyn /
Last active October 8, 2020 18:35 — forked from taxilian/
Mongodb scripts for incremental backup
source $(dirname "$0")/
mkdir -p -v "${OUTPUT_DIRECTORY}"
DEST_PATH=${OUTPUT_DIRECTORY}/full/$(date \+\%Y\%m\%d_\%s)
log $LOG_MESSAGE_INFO "[INFO] starting full backup of ${MONGODB_URI} to ${DEST_PATH}"
sassyn / haproxy-db.conf
Created November 8, 2018 19:31 — forked from aw/haproxy-db.conf
HAProxy configuration for MySQL failover and redundancy
# HAProxy configuration - haproxy-db.cfg
# Load-balanced IPs for DB writes and reads
frontend db_write