Skip to content

Instantly share code, notes, and snippets.

View markdavidburke's full-sized avatar
🎯
Focusing

Mark Burke markdavidburke

🎯
Focusing
View GitHub Profile
#!/bin/bash
# IMPORTANT: Make sure your VM's network security rules allows access over TCP Port 80.
# This is required to pass the HTTP challenge.
# Download: curl -o setup.sh <raw URL of this gist>
# Enable execution: sudo chmod +x setup.sh
# Run: ./setup.sh -d "yourdomain.tld" -e "youremail@yourdomain.tld"
while getopts d:e: option
@47ronin
47ronin / yt-dlp.sh
Last active April 7, 2024 06:28
Use yt-dlp to merge best video and best audio formats together into an MPEG-4 container, check for AV1/VP9, and transcode to H.264 if necessary. Usage: ./yt-dlp.sh <video_url>
#!/bin/bash
youtube_url="$1"
echo "Downloading video..."
video_info=$(yt-dlp -e -o "%(title)s" -- "$youtube_url")
sanitized_title=$(echo "$video_info" | sed 's/[^a-zA-Z0-9_.-]/_/g')
output_file="${sanitized_title}.mp4"
yt-dlp -o "temp.mp4" -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' -- "$youtube_url"
@ShvaykaD
ShvaykaD / upgrade-postgresql-service-centos-7.md
Created May 4, 2020 16:29
Upgrading PostgreSQL service from 9.x or 10.x to 11 version on CentOS 7
@virtualbeck
virtualbeck / ecr_copy.sh
Last active February 18, 2024 02:32
copy n number of tagged docker images from one aws ecr account to another
#!/bin/bash
set -e
################################# UPDATE THESE #################################
LAST_N_TAGS=10
SOURCE_REGION="us-west-1"
DESTINATION_REGION="us-east-1"
SOURCE_PROFILE="profile_1"
@kasuken
kasuken / profiles.json
Created June 23, 2019 12:22
Windows Terminal settings and files
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
@Nyr
Nyr / openvpn-useradd-bulk.sh
Last active October 2, 2023 03:50
Simple script for adding users in bulk to an openvpn-install setup
#!/bin/bash
# Fast way for adding lots of users to an openvpn-install setup
# See the main openvpn-install project here: https://github.com/Nyr/openvpn-install
# openvpn-useradd-bulk is NOT supported or maintained and could become obsolete or broken in the future
# Created to satisfy the requirements here: https://github.com/Nyr/openvpn-install/issues/435
if readlink /proc/$$/exe | grep -qs "dash"; then
echo "This script needs to be run with bash, not sh"
exit 1
@9point6
9point6 / ssh-retry.sh
Last active April 22, 2023 08:44
Keep retrying SSH connection until success (Useful for waiting for VMs to boot)
#!/usr/bin/env bash
# Check we've got command line arguments
if [ -z "$*" ] ; then
echo "Need to specify ssh options"
exit 1
fi
# Start trying and retrying
((count = 100))
@DRN88
DRN88 / send-aws-sns-sms.sh
Last active January 11, 2023 13:46
Send aws sns sms messages with bash. Zabbix
#!/bin/bash
#
# 1, Create AWS IAM user with a policy allowing only AWS SNS Publish command
# 2, Install awscli with 'yum -y install awscli' on zabbix server
# 3, Add /bin/bash shell for zabbix user: usermod -s /bin/bash zabbix
# 4, Deploy this script to: /etc/zabbix/send-aws-sns-sms.sh
# 5, Edit this script and define the required variables
# 6, Run the script manually to test
# 7, Use the script in Zabbix. Create a new Media Type -> Script
# Use zabbix documentation for the script parameter setup
@freewayz
freewayz / aws-boto-s3-download-directory.py
Created October 6, 2016 15:35
Download files and folder from amazon s3 using boto and pytho local system
#!/usr/bin/env python
import boto
import sys, os
from boto.s3.key import Key
from boto.exception import S3ResponseError
DOWNLOAD_LOCATION_PATH = os.path.expanduser("~") + "/s3-backup/"
if not os.path.exists(DOWNLOAD_LOCATION_PATH):
@Ray33
Ray33 / gist:ba189a729d81babc99d7cef0fb6fbcd8
Last active July 22, 2022 10:50 — forked from SamCyanide/gist:780afff4c3e1a9e105264c2a476e037c
Amazon Elastic Network Adapter (ENA) on CentOS 7
sudo su
yum --enablerepo=extras install epel-release
yum -y install patch dkms kernel-devel perl
yum update
#Required for kernel num 5:
yum --enablerepo=elrepo-kernel -y install kernel-ml-devel
reboot