Skip to content

Instantly share code, notes, and snippets.

@tzmartin
tzmartin / m3u8-to-mp4.md
Last active April 27, 2025 10:04
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active October 14, 2024 15:38
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@vxhviet
vxhviet / simplifiedGitFlow.md
Last active March 2, 2025 11:36
A simplified version of Git Flow

Simplified Git-flow

                        RELEASE TAG
o----------------------------o-----------------o------------o------> MASTER
 \                          /  \                \----------/ HOTFIX
  \                        /    \                          \
   \----------------------/      \--------------------o-----o------> DEVELOP
                                  \                  /
 \----------------/ FEATURE
@joseluisq
joseluisq / stash_dropped.md
Last active March 18, 2025 14:49
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@bbuechler
bbuechler / build-a-bastion.sh
Last active December 22, 2022 19:18
Deploy a SSM-Bastion with magic key pulling
# Upload your key to NGAP Bastion Self-serve bucket
# https://wiki.earthdata.nasa.gov/display/ESKB/SSH+Bastion+Key+Upload+-+Self-Service
export key_bucket=$(aws s3 ls | xargs -n1 echo | grep ngap-bastion-authorized-public-keys)
export my_ssh_key="/path/to/.ssh/<your_private_key>"
aws s3 cp $my_ssh_key.pub s3://$key_bucket/
# Optional Params with Reasonable Defaults that you may want to change
export bastion_name="SSM Bastion"
export instance_type="t2.micro"