Skip to content

Instantly share code, notes, and snippets.

@lrhazi
lrhazi / t.sh
Last active March 27, 2024 15:50
[object Object]
devices = $(
"ADC-ISAZ-DEV-AWAF-1A.inw.cigna.com",
"ADC-ISAZ-DEV-AWAF-1B.inw.cigna.com",
"ADC-ISAZ-DEV-LTM-1A.inw.cigna.com",
"ADC-ISAZ-DEV-LTM-1B.inw.cigna.com",
"WDC-ISAZ-DMZ-DEV-LTM-1A.inw.cigna.com",
"WDC-ISAZ-DMZ-DEV-LTM-1B.inw.cigna.com",
"ADC-ISAZ-DMZ-LTM-1A.inw.cigna.com",
"ADC-ISAZ-DMZ-LTM-1B.inw.cigna.com",
"ADC-ISAZ-DMZ-LTM-2A.inw.cigna.com",
import os
import time
from playwright.sync_api import sync_playwright, expect
import logging
URL = "https://admin.google.com/"
URL_USERS = "https://admin.google.com/ac/users"
USERNAME = input("Enter Google Admin username: ")
PASSWORD = input("Enter the password: ")
DELETION_DATE = input("""Enter the deletion date (e.g. "Fri, Mar 22, 2024"): """)
import os
import time
from playwright.sync_api import sync_playwright, expect
from logger import logger
from utils import get_db_version_from_filename
URL = "https://my.f5.com/manage/s/downloads"
when HTTP_REQUEST {
if {[HTTP::has_responded]}{return}
set collect_length 2048
if {([HTTP::uri] eq "/login") && ([HTTP::method] eq "POST")} {
# check content length
if {[HTTP::header "Content-Length"] ne "" && [HTTP::header "Content-Length"] <= $collect_length }{
set content_length [HTTP::header "Content-Length"]
} else {
set content_length $collect_length
}
@lrhazi
lrhazi / prep-contacts.py
Last active August 14, 2022 12:36
Fix Contact Groups IDs
import csv,sys
# contact groups export from source account (CSV)
fn1=sys.argv[1]
# contact groups export from target account (CSV)
fn2=sys.argv[2]
# Exported contacts from source account
contacts_csv_fn=sys.argv[3]
# Exported contacts from source account (Corrected)
contacts_csv_fn2=sys.argv[4]
@lrhazi
lrhazi / copy-contacts.sh
Last active August 14, 2022 12:36
Copy Google Workspace Contacts from one account to another
#!/bin/bash
shopt -s expand_aliases
alias gam='/root/bin/gamadv-xtd3/gam'
if [[ $# -ne 2 ]]; then
echo "Usage: $0 user-src@dom.ain user-target@dom.ain" >&2
exit 2
fi
USER_SRC=$1
@lrhazi
lrhazi / basic.irule.tcl
Last active September 24, 2020 23:10
sample irule
when HTTP_REQUEST {
set uriLowered [string tolower [HTTP::uri]]
if { $uriLowered starts_with "/home" } {
pool home_pool
} else {
pool default_pool
}
}
FROM stackbrew/ubuntu:saucy
RUN apt-get update
RUN apt-get install -y --force-yes \
software-properties-common \
pciutils \
debconf-utils
RUN add-apt-repository -y ppa:saltstack/salt
RUN apt-get update
@lrhazi
lrhazi / dns_rate_limit_client.tcl
Created March 19, 2014 01:00
F5 GTM iRule: An attempt at RRL Response Rate Limiting
when RULE_INIT {
# Max queries per second, per client ip
set static::maxconn 100
# Max identical responses per second, per client ip
set static::maxresp 20
# Number of seconds to drop traffic from infringing client ip.
set static::holdtime 15
# Maximum entries in dns_drop session table.
set static::max_drop_entries 1000000
# Maximum per client, per query, table size.