Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
#!/bin/bash | |
for f in "${@}" | |
do | |
if [ ! -f "${f%.*}.m4v" ]; then | |
HandBrakeCLI --preset="AppleTV 2" -i "$f" -o "${f%.*}.m4v" | |
else | |
echo "Skpping $f - already exists: ${f%.*}.m4v" | |
fi | |
done |
#!/bin/sh | |
# | |
# Setup a work space called `work` with two windows | |
# first window has 3 panes. | |
# The first pane set at 65%, split horizontally, set to api root and running vim | |
# pane 2 is split at 25% and running redis-server | |
# pane 3 is set to api root and bash prompt. | |
# note: `api` aliased to `cd ~/path/to/work` | |
# | |
session="work" |
#!/bin/sh | |
SEP= | |
SEPE= | |
CLOCK=⌚ | |
CALENDAR=☼ | |
MUSIC=♫ | |
WIDTH=${1} |
findcpu(){ | |
sysctl -n machdep.cpu.brand_string | |
} | |
findkernelversion(){ | |
uname -mrs | |
} | |
mem=$(sysctl -n hw.memsize) |
#!/bin/bash | |
[ -z "$PS1" ] && return | |
# ~/.local/share/fonts/ | |
# https://github.com/powerline/fonts | |
color_black_black='\[\e[0;30m\]' | |
color_black_red='\[\e[0;31m\]' | |
color_black_green='\[\e[0;32m\]' |
The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.
With ffmpeg
this can be achieved with -c copy
. Older examples may use -vcodec copy -acodec copy
which does the same thing.
These examples assume ffmpeg
is in your PATH
. If not just substitute with the full path to your ffmpeg binary.