Skip to content

Instantly share code, notes, and snippets.

View ChristianBagley's full-sized avatar

Christian Bagley ChristianBagley

View GitHub Profile
@guycalledseven
guycalledseven / manual-uninstall-parallels.sh
Last active March 4, 2025 06:08
Manually remove Parallels Desktop v15 leftovers MacOS
# used different forum posts/guides to figure this out like:
# The uninstall script is located at /Library/Parallels/Parallels Service.app/Contents/Resources
# https://github.com/danijeljw/remparallels/blob/master/remprls.sh
# https://kb.parallels.com/122461
# sudo find / -iname "*parallels*"
# sudo find / -iname "*prl*"
#before uninstalling deactivate your licencse - this won't be possible after uninstall
prlsrvctl deactivate-license
@joshghent
joshghent / sqs_to_sns.py
Created January 14, 2020 10:29
A small script to push messages from SQS to SNS
# Usage
# $ python sqs_to_sns.py my-queue-name
import boto3
import sys
import queue
import threading
from datetime import datetime
import json
@ejlp12
ejlp12 / AWSDevOpsStudyNotes
Created October 3, 2019 00:09
AWS DevOps Engineer Professional Study Notes
CI & CD:
========
2 core software development processes
CI process of automating regular code commits followed by an automated build and test process designed to highlight intergration issues early.
Additional tooling and functionality provided by Bamboo, CruiseControl, Jenkins, Go and TeamCity etc.
workflow based
CD takes the form of a workflow based process which accepts a tested software build payload from a CI server. Automates the deployment into a working QA, Pre-prod or Prod environment.
AWS CodeDeploy and CodePipeline provide CI/CD services
Elasticbeanstalk and CFN provide functionality which can be utilized by CI/CD servers.
@0xhexmex
0xhexmex / joindomain.sh
Created March 21, 2019 13:48
Join a linux host to an AD domain
# Created by Joaquim Nogueira (@lkys37en), March 2019. I take no credit for this awesome work :)
#!/bin/bash
print_usage() {
echo ""
echo "A huge thank you to Brax from proslackers for helping me with this script, thank you!"
echo ""
echo "Usage: $0 -d lkylabs.com -u Administrator -p Welcome1! -o OU=Linux-Servers,OU=Servers,OU=Computers,OU=lkylabs,DC=lkylabs,DC=com -s 'lkylabs\\domain^admins lkylabs\\linux^admins' -x 'lkylabs\\domain^admins'"
echo
@colehocking
colehocking / ntp_drift_slack_alert.sh
Last active April 30, 2020 22:08
Send slack alert if Docker logs on Ubuntu server indicate NTP drifting has occurred.
#!/bin/bash
# Send a slack notification if docker logs indicate an NTP time drift
# -- Cole Hocking
# Should be run in a cron job that runs every 24 hours
# Grab the docker container ID dynamically; in case the ID changes
# Update: This can be statically assigned to the container NAME: 'IMAGE_NAME'
# This also assumes only one docker container is running!!
@paulgalow
paulgalow / awscreds-lpass.sh
Last active August 17, 2020 19:02
Get AWS CLI IAM credentials from LastPass CLI. Blog post: https://paulgalow.com/securing-aws-credentials-macos-lastpass
#!/bin/bash
# Get AWS CLI IAM credentials from LastPass CLI
# Blog post: https://paulgalow.com/securing-aws-credentials-macos-lastpass
# ##############################################################################
# Please adjust those properties
readonly lastPassEntry="REPLACE-ME" # Name of LastPass entry that stores your IAM credentials
readonly lpass="/usr/local/bin/lpass" # Path to LastPass CLI
# ##############################################################################
@pkazi
pkazi / cloudTrailEventNames.list
Last active February 8, 2025 07:28
List of values for parameter EventName in AWS Cloudtrail events
AbortDocumentVersionUpload
AbortEnvironmentUpdate
AbortMultipartUpload
AbortVaultLock
AcceptAccountMapping
AcceptCertificateTransfer
AcceptDelegate
AcceptDirectConnectGatewayAssociationProposal
AcceptFxPaymentCurrencyTermsAndConditions
AcceptHandshake
@brunopadz
brunopadz / delete_ec2_snapshots.sh
Last active April 4, 2020 16:12
Delete AWS Snapshots older than 15 days
DT=`date --date "-15 days" +"%Y-%m-%d"`
aws ec2 describe-snapshots --filters Name=description,Values="*OpsAutomator*" --query "Snapshots[?StartTime<='$DT'].{ID:SnapshotId}" | jq -r '.[] .ID' | while read rola; do
aws ec2 delete-snapshot --snapshot-id $rola && echo "ok" $rola || echo "not deleted"
done
@42milez
42milez / install_amzndriver_centos.sh
Last active May 27, 2020 17:44
This script install the Linux kernel driver to provide ENA support for CentOS 7.x and 6.x.
#!/usr/bin/env bash
# https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/enhanced-networking-ena.html
amzn_driver_ver="1.5.3"
centos_ver=`sed -e 's/^CentOS\s\(Linux\s\|\)release\s\([0-9.]\+\)\s.\+$/\2/' /etc/centos-release`
# Install the appropriate kernel-devel and kernel-headers
# --------------------------------------------------
yum install -y perl
@jimfoltz
jimfoltz / tw5-server.rb
Last active February 15, 2025 17:03
A local server for TiddlyWiki5 that allows saving wiki.
require 'webrick'
require 'fileutils'
BIND_ADDRESS = "127.0.0.1"
PORT = 8080
BACKUP_DIR = 'bak'
if ARGV.length != 0
root = ARGV.first.gsub('\\', '/')