Skip to content

Instantly share code, notes, and snippets.

@lionslair
lionslair / remove_pulse_inserts.sh
Last active June 4, 2024 02:16
Remove the pulse inserts from sql script
#!/bin/bash
# Check if the script received an argument
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <sql_file>"
exit 1
fi
# Check if the file exists
if [ ! -f "$1" ]; then
@lionslair
lionslair / git_fetch_pull_all_subfolders.sh
Created March 24, 2024 07:47 — forked from mnem/git_fetch_pull_all_subfolders.sh
Simple bash script for fetching and pulling all repos in the executed folder to the latest of the branch they are on
#!/bin/bash
################
# Uncomment if you want the script to always use the scripts
# directory as the folder to look through
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPOSITORIES=`pwd`
IFS=$'\n'
@lionslair
lionslair / dump_route53_records.md
Created August 5, 2024 02:46 — forked from porjo/dump_route53_records.md
Export route53 records to CSV

Retrieve hosted zones with aws route53 list-hosted-zones then enter the zone Id below:

aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | \
   jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?]  | @tsv'