This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def find_matching_file(smartsheet_filename, input_filename, directory): | |
# Normalize input filenames by converting to lowercase and removing .mp4 if present | |
def normalize_filename(filename): | |
filename = filename.lower().rstrip('.mp4') # Remove trailing ".mp4" (case-insensitive) | |
return filename | |
normalized_smart_filename = normalize_filename(smartsheet_filename) | |
normalized_input_filename = normalize_filename(input_filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get volume name | |
volname=$(kubectl get pvc mbiq-local-storage-pv-claim -o yaml | grep "volumeName:" | awk '{print $2}') | |
if [[ -z "$volname" ]]; then | |
echo "volumeName could not be found." | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check for the correct number of arguments | |
if [ "$#" -ne 3 ]; then | |
echo "Usage: $0 <script_name> <source_IP> <destination_IP>" | |
exit 1 | |
fi | |
script_name="$1" | |
source_ip="$2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: | |
~/testlab/venv/bin/python ~/testlab/ce_coords.py | |
Enter the installation address for your F5 Distributed Cloud CE device: | |
801 5th Ave, Seattle WA 98104 | |
Latitude: 47.60518879999999, Longitude: -122.33104424785958 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ltm rule session_table_control { | |
when HTTP_REQUEST { | |
set APPNAME "subtables"; | |
set luri [string tolower [HTTP::uri]] | |
set app [getfield $luri "/" 2]; | |
set cmd [getfield $luri "/" 3]; | |
set tname [URI::decode [getfield [HTTP::uri] "/" 4]]; | |
set arg1 [URI::decode [getfield [HTTP::uri] "/" 5]]; | |
set arg2 [URI::decode [getfield [HTTP::uri] "/" 6]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name DC Code Tag Fix v2 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Jason Rahm w/ ChatGPT Assist | |
// @match https://community.f5.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=f5.com | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc script::run {} { | |
# where to store the data - /shared/images | |
set fp [open "/shared/images/poolstats.csv" w+] | |
tmsh::cd / | |
# CSV HEADER | |
puts $fp "pool,member,ss.bits-in,ss.bits-out,ss.pkts-in,ss.pkts-out" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bigrest.bigip import BIGIP | |
from time import sleep | |
import argparse | |
import getpass | |
import sys | |
def build_parser(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("host", help="BIG-IP IP/FQDN") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Source File CSV Contents: | |
10.10.10.10, | |
10.10.10.11,hi there | |
10.10.11.0/24, | |
10.10.12.0/24,/url/path/here | |
10.10.13.0/24, | |
Output File Txt Contents: | |
host 10.10.10.10, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ltm rule aoc_day1 { | |
proc find_sum { snack_list } { | |
set calorie_sum 0 | |
foreach snack [string map { \{ "" \} "" } $snack_list] { | |
set calorie_sum [expr {$calorie_sum + $snack}] | |
} | |
return $calorie_sum | |
} |
NewerOlder