Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AgentOak
AgentOak / youtube_formats.md
Last active June 7, 2024 13:55
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@mihow
mihow / load_dotenv.sh
Last active June 7, 2024 12:52
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
@alces
alces / ansible_local_playbooks.md
Last active June 5, 2024 17:36
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@ganine
ganine / Vagrantfile
Last active March 27, 2024 08:19
Basic Vagrantfile with provisioning shell script
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.provision :shell, :privileged => false, :path => "bootstrap_ubuntu1204.sh"
end
@jeffchao
jeffchao / show-git-branch
Last active May 27, 2023 09:26
Show git branches ordered by latest commit. Also by name and date.
# By commit hash
git for-each-ref --sort=-committerdate refs/heads/
# By name, date.
git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(authorname) %(refname:short)'