Skip to content

Instantly share code, notes, and snippets.

View crashGoBoom's full-sized avatar

Christopher Mundus crashGoBoom

View GitHub Profile
@crashGoBoom
crashGoBoom / c-est_quoi_ça.sh
Last active December 25, 2020 21:37
Useful investigation for linux
#!/bin/bash
# Get open network connections
lsof -a -i4 -i6 -itcp
# Get listening ports
netstat -tunlp
@crashGoBoom
crashGoBoom / install-codeql.sh
Last active July 6, 2024 17:18
Install codeql for MacOS (BigSur)
#!/bin/bash
# Check for latest release: https://github.com/github/codeql-cli-binaries/releases
_version='v2.4.1'
_arch='osx'
_zip_url="https://github.com/github/codeql-cli-binaries/releases/download/${_version}/codeql-${_arch}64.zip"
_dir='codeql-home'
_cores=2
pushd "${HOME}" || exit
@crashGoBoom
crashGoBoom / create_test_video.sh
Created February 15, 2021 23:24
Generate a 30 second test video with tone with FFMPEG
ffmpeg -f lavfi -i 'testsrc[out0];sine[out1]' -t 30 -pix_fmt yuv420p colorbars_tone.mp4
@crashGoBoom
crashGoBoom / send_colorbars_tone_to_rtmp.sh
Created February 15, 2021 23:27
Send colorbars and tone to RTMP endpoint using FFMPEG
ffmpeg -re -f lavfi -i 'testsrc[out0];sine[out1]' \
-c:v libx264 -pix_fmt yuv420p -profile:v main \
-preset veryfast -x264opts "nal-hrd=cbr:no-scenecut" \
-minrate 3000 -maxrate 3000 -g 60 -c:a aac -b:a 160k \
-ac 2 -ar 44100 -f flv \
rtmps://$INGEST_ENDPOINT
@crashGoBoom
crashGoBoom / block_non_root_ec2_meta.sh
Created August 4, 2021 16:25
Block non root users from accessing ec2 metadata
#!/bin/bash
# This will block users that are not root from accessing ec2 metadata
# Prevents users from grabbing the instance credentials
iptables -A OUTPUT -m owner ! --uid-owner root -d 169.254.169.254 -j DROP