This file contains 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 selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.common.exceptions import TimeoutException | |
from urllib.parse import urlparse | |
import re | |
import sys | |
# Get the URLs from the command-line arguments | |
url = str(sys.argv[1]) |
This file contains 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
# This Selenium Script tests given URLs from a TXT file and reports all links >= 400 | |
# prerequest to execute it | |
# brew install python | |
# brew install chromedriver | |
# pip3 install selenium | |
# pip3 install requests | |
import time | |
import traceback | |
import requests |
This file contains 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 | |
# Search for filenames with whitespaces in the current directory and its subdirectories | |
find . -type f -name "* *" -print0 | while read -d $'\0' file | |
do | |
# Replace whitespace with - | |
new_file=$(echo "$file" | tr ' ' '-') | |
# Rename file | |
mv -v "$file" "$new_file" |
This file contains 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 if the directory path is provided | |
if [[ $# -eq 0 ]] | |
then | |
echo "Usage: $0 <directory_path>" | |
exit 1 | |
fi | |
# set the path to the drawio command line tool |
This file contains 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 | |
KEYCLOAK_URL=$1 | |
REALM=$2 | |
if [[ $3 == "client" ]]; then | |
CLIENT_ID=$4 | |
CLIENT_SECRET=$5 | |
RESPONSE=$(curl -s -X POST \ | |
-H "Content-Type: application/x-www-form-urlencoded" \ |
This file contains 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 | |
# Set the name of the organization | |
org_name=$1 | |
# Generate a timestamp to include in the filename | |
timestamp=$(date "+%Y%m%d_%H%M%S") | |
# Define the output filename with the timestamp included | |
output_filename="repo_list_${org_name}_${timestamp}.csv" |