Skip to content

Instantly share code, notes, and snippets.

View austinsonger's full-sized avatar
🙃
Localhost

Austin Songer, CISSP austinsonger

🙃
Localhost
View GitHub Profile
@austinsonger
austinsonger / gist:adf02067a2cde3a9f84b7d82d6849f07
Created December 13, 2024 21:09 — forked from jmwhittaker/gist:8516514
Use FFmpeg to resize and generate .mp4 & .webm videos from any source video.
/**
Scaling
- Scale can be used as is which will set the height to 560 but keep aspect ratio for width.
- Other options include setting both with & height
- Watch out for sizing errors when not divisible by 2
**/
/** MP4 1st pass **/
ffmpeg -i input.mov -vcodec libx264 -vprofile high -preset veryslow -b:v 225k -maxrate 300k -bufsize 1000k -vf scale=-1:560 -threads 2 -pass 1 -an -f mp4 /dev/null
@austinsonger
austinsonger / osx-for-hackers.sh
Created December 13, 2024 21:08 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@austinsonger
austinsonger / aws-sso-login.sh
Created December 13, 2024 21:07 — forked from aharonha/aws-sso-login.sh
Login to aws sso and create credentials file
#!/usr/bin/env bash
RED='\033[0;31m'
YELLOW='\033[0;33m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
installer=`which brew || which yum || which apt-get`
which jq >/dev/null || $installer install jq
@austinsonger
austinsonger / .bash_aliases
Created December 13, 2024 21:06 — forked from aharonha/.bash_aliases
Automatic fetch all git repositories. A thing that you might want to add to your cron. Also some nice bash aliases for dockers.
#!/bin/bash
function aprint() { awk "{print \$${1:-1}}"; }
alias dockerstart='docker ps -a --format="{{.ID}}" |xargs -ir docker start {}'
alias dockerrmi="docker images | grep none | aprint 3 | xargs -I[] -r docker rmi []"
alias dockerrm="docker ps | grep Exited | aprint 1 | xargs -I[] -r docker rm []"
alias dockerrmall="docker ps -a | tail -n -1 | grep -v Up | aprint 1 | xargs -I[] -r docker rm []"
function ___date() { echo -n "[`date --rfc-3339=seconds `] "; }
function dockerkill() { docker ps | grep $1 | aprint 1 | xargs -I[] -r docker stop []; }
function dockerdel() { docker images | grep $1 | aprint 3 | xargs -I[] -r docker rmi []; }
function untilfail() { while $@; do :; done }
@austinsonger
austinsonger / python_environment_setup.md
Created December 13, 2024 21:06 — forked from wronk/python_environment_setup.md
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview of Python Virtual Environments

This guide is targetted at intermediate or expert users who want low-level control over their Python environments.

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. This helps keep each workflow in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. The guide here covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.


h/t @sharkinsspatial for linking me to the perfect cartoon

@austinsonger
austinsonger / create-release-and-mergebacks.sh
Created December 13, 2024 21:06 — forked from aharonha/create-release-and-mergebacks.sh
Script for creating both release and merge-back pull requests in github.
#!/usr/bin/env bash
RED='\033[0;31m'
YELLOW='\033[1;93m'
PURPLE='\033[0;35m'
GREEN='\033[0;32m'
BLUE='\033[0;94m'
NC='\033[0m' # No Color
APP_FNAME=$(basename -- "$0")
@austinsonger
austinsonger / bash_profile.sh
Created December 13, 2024 21:05 — forked from kjbrum/bash_profile.sh
My personal bash profile
#---------------------------------------------------------------------------------------------------------------------------------------
#
# Author: Kyle Brumm
# Description: File used to hold Bash configuration, aliases, functions, completions, etc...
#
# Sections:
# 1. ENVIRONMENT SETUP
# 2. MAKE TERMINAL BETTER
# 3. FOLDER MANAGEMENT
# 4. MISC ALIAS'
@austinsonger
austinsonger / .bash_profile
Created December 13, 2024 21:05 — forked from draeath/.bash_profile
environment: homedir
# keep contents in sync with .profile (except the .bashrc call)
export CONDA_DIR="/opt/${USER}/mamba"
export PATH="${CONDA_DIR}/bin:$PATH"
export CONFIGURE_OPTS="--enable-optimizations"
export PYTHON_CFLAGS="-pipe -m64 -march=generic64 -mtune=native"
export PYTHON_MAKE_OPTS="-j$(nproc)"
export PYTHON_MAKE_INSTALL_OPTS="$PYTHON_MAKE_OPTS"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
@austinsonger
austinsonger / .bashrc
Created December 13, 2024 21:05 — forked from ammrat13/.bashrc
My configuration files
# Sourced on shell startup
# Also sourced on login since .bash_profile calls this
# Add extra binaries as needed
export PATH="${HOME}/.nimble/bin/:${PATH}"
# Set up Java's environment
export JAVA_HOME="/usr/lib/jvm/default-runtime"
@austinsonger
austinsonger / .bash_profile
Created December 13, 2024 21:05 — forked from Kyrremann/.bash_profile
My dotfiles
echo ".bash_profile"
# Harden homebrew
# from: https://github.com/AtropineTears/TheMacHardeningScripts/blob/main/AutoHarden_MacOSX/scripts/brew/brew-harden.sh
export HOMEBREW_NO_INSECURE_REDIRECT=1
export HOMEBREW_FORCE_BREWED_CURL=1
export HOMEBREW_AUTO_UPDATE_SECS=60
export HOMEBREW_DISPLAY_INSTALL_TIMES=1
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_AUTO_UPDATE_SECS=300