Skip to content

Instantly share code, notes, and snippets.

@thearrow
thearrow / add_stereo_track.sh
Created November 12, 2021 14:50
Add a downmixed stereo track to a video file using ffmpeg
#!/usr/bin/env bash
# USAGE:
# add_stereo_track *.mkv
#
# Will downmix a 5.1 track and add a new stereo audio track to the file.
# Will create a new file (same format as original, with other tracks copied, including subs)
# and rename the original with a .bak extension.
set -o nounset
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.20312860608100891</real>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Lock Test</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="http://cdn.auth0.com/js/lock/10.16.0/lock.min.js"></script>
</head>
<body>
@thearrow
thearrow / ssh.pub
Last active September 16, 2024 18:49
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDzoj4XvXnQhryNNWPxD/bVPoraWJ6OOjPM9wYWx63ktrr+gBVxp3ogk9SLT3OdRvkA1iFnB8jjoD+N2ssONVaWaZTiRfzdUB+6o/c6XKbGQJJ67ZLoMWnmezsx5rp0OtHQKNApoqpCKL38GIBYsW6ADgC+lyKoBcDrLuHdtMXFr/ejw6bEG9XCFRhDIFPlq1YXcHI5QcUaXmC4mFD1xNo/w9HP0EhjDdXmNqrCIeYJegP+BE+S7jH3eosOraDeYME7NAoN4yGQS25Y8kyHfoozDupJ5oe7l7yNK+33X1P0hDcZF2tiLAWzjucAnLq34KM4Ls2iNYSHC+LOX8gUxDPDoxjcsRafXe/F/3BVJ157o10srYaiSExLLsfo3mF7/37FUzi6a0nCoPCSgsUKFY7zNM2ogrJLY4jhN9zOtiuuny7F/8W8zoNeWXUxVjZ344MNMza62ufcZiM3ZbURjd1dHs/u6QZLKwf32qx3nnGa+2onqXLGmYVon8gAnwv5R6a0kXgh/iDYwQxgB39h/6lIAAu/CgJBC8HJk332GXg/lDxVM12VqE0u8EYGfNuxa/pzcgJB7fyzVwHElrEIdMpK63i3yZ9JgrRTFjXIFEfnXlsbNbqRG9VlPflmQjWwSqrW/d7ZOYIG3rWH+TKBglc5g3IaqnOIksypaWWsa/FbOw== thearrow3456@gmail.com
@hooks.before_each
def add_user_and_permissions(transaction):
headers = transaction['request']['headers']
headers['Permissions'] = json.dumps(['viewpoints:view'])
headers['Username'] = "test@test.com"
@thearrow
thearrow / shrink.sh
Last active September 28, 2016 04:20
Shrink Vagrant/VBox Disk
# in vbox gui for vagrant machine:
sudo apt-get install zerofree
# boot vm into recovery mode in vbox gui (hold down esc)
df
# (optional) mount -o remount,ro {disk eg. /dev/sda1}
zerofree {disk}
halt
# on host machine after locating box .vmdk: