Skip to content

Instantly share code, notes, and snippets.

View lancehunt's full-sized avatar

Lance Hunt lancehunt

View GitHub Profile
@lancehunt
lancehunt / mp4_to_gif.sh
Created March 2, 2017 17:19
Convert MP4 to animated Gif
#!/bin/bash
brew install ffmpeg
ffmpeg -y -ss 3 -t 3 -i ~/Downloads/input.mp4 -vf fps=10,scale=800:-1:flags=lanczos,palettegen palette.png
ffmpeg -ss 1 -t 30 -i ~/Downloads/input.mp4 -i palette.png -filter_complex "fps=10,scale=800:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
# 30-second output at 800 x 600 resolution
@lancehunt
lancehunt / prune_aws_security_groups.md
Last active October 31, 2017 17:27 — forked from asinghal/prune_aws_security_groups.md
Clean up AWS Security groups

Commands to get security groups in use and echo names of groups that can not be found in use

Note: Always check manually before deleting security groups. There are various places the groups may be used, and the scripts output may not always be conclusive

aws elb describe-load-balancers --query 'LoadBalancerDescriptions[*].SecurityGroups' --output text | tr '\t' '\n' | sort | uniq > used.txt

aws elbv2 describe-load-balancers --query 'LoadBalancers[*].SecurityGroups' --output text | tr '\t' '\n' | sort | uniq >> used.txt
@lancehunt
lancehunt / oauth2-authcode.sh
Last active May 20, 2023 12:25
TradeStation OAuth2 Auth Code tester
#!/bin/bash
######################################################
# Stolen & Modified by Lance Hunt
# Author: Unknown
#
# Please let me know who the righful author is so I
# can give due credit
######################################################
echo '* Installing oauth2 Ruby gem'
@lancehunt
lancehunt / gist:31063b6e506a425150858f45e4a6b8d2
Created January 6, 2020 06:27
Fix cached plist file on Mac
touch /Applications/App.app
touch /Applications/App.app/Contents/Info.plist
killall Dock
# Source...somewhere on Stack Overflow