- Install mkvtoolsnix.
brew install --with-qt5 mkvtoolnix
- Use mkvinfo to get the audio track IDs that you want.
mkvinfo *.mkv
- Note that the audio track IDs are not the track numbers. Check the man page of mkvmerge or mkvinfo for more details.
- Use mkvmerge to create a copy of the mkv with ONLY the desired tracks using
--audio-tracks
. mkvmerge -o out.mkv -a 2 orig.mkv
# generic version | |
ssh -R <remote_port>:<local_interface>:<local_port> <remote machine> | |
# example (dev is a host configured in ~/.ssh/config) | |
ssh -R 4567:localhost:4567 dev | |
# Ubuntu hosts require an extra step of config | |
# http://askubuntu.com/questions/50064/reverse-port-tunnelling/50075#50075 | |
# (run on server) | |
sudo echo -e "Match User scott\n GatewayPorts yes" >> /etc/ssh/sshd_config |
#!/bin/bash | |
# Script to clone all repositories under a user from bitbucket | |
# Usage: getAllRepos.sh [username] | |
repos=$(curl -u ${1} https://api.bitbucket.org/1.0/users/${1} | jq -r '.repositories[] | .slug') | |
vcs=git # or hg | |
for repo_name in $repos | |
do | |
echo -e "\tFetching $repo_name" | |
$vcs clone "ssh://[email protected]/${1}/$repo_name" |
# got this from http://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles | |
ffmpeg -i infile.mp4 -f srt -i infile.srt -c:v copy -c:a copy -c:s mov_text outfile.mp4 | |
# confirmed working with the following ffmpeg | |
# (installed using `brew 'ffmpeg', args: ['with-libvorbis', 'with-libvpx']` ) | |
ffmpeg version 3.1.2 Copyright (c) 2000-2016 the FFmpeg developers | |
built with Apple LLVM version 7.3.0 (clang-703.0.31) | |
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libvpx --disable-lzma --enable-vda |
exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.
If Disk Utility is unable to repair, consider trying this:
- In Disk Utility, ensure that the drive is not mounted, eject it if it is mounted.
- Use
diskutil list
to find the right drive id. - You want the id under the IDENTIFIER column, it should look like
disk1s1
- Run
sudo fsck_exfat -d <id from above>
. egsudo fsck_exfat -d disk1s3
-d
is debug so you'll see all your files output as they're processed.
Port forwarding should be fairly straightforward, but what Arris doesn't tell you is that you need to have the firewall on in order for port forwarding settings to have an effect.
I don't know why the "firewall off" option would mean "block everything", but as best I can tell, that was the case on my Arris DG2470A (from RCN, could be some custom firmware that RCN uses?)
So step by step:
I always forget these steps and have to google for them, even though they're super simple
Prereq:
pip install gsutil
gsutil config
, have your project id ready.
tar --create --verbose --xz --file images.tar.xz /directory/containing/images/*
gsutil cp images.tar.xz gs://<bucket name>
Zsh has a feature called zpty which creates a pseudo-terminal in the background.
According to the docs, this can be useful to run a program in the background that expects to be run in a normal terminal environment.
Some zsh themes such as pure use this to run commands asynchronously. Pure uses the zsh plugin zsh-async for this.
DirectTV Now added a FreeVIEW thing where you can watch some tv shows for free, but they don't show you only the shows that are available on "FreeVIEW", because that would be too convenient.
Luckily, they helpfully mark these subscriber only shows with a badge on the /watch/shows
endpoint.
Here's a bookmarklet to hide the subscriber only shows.
javascript:document.querySelectorAll("[data-label='SUBSCRIBE']").forEach( (el) => { el.parentNode.parentNode.parentNode.parentNode.style.display = 'none'; });