Skip to content

Instantly share code, notes, and snippets.

View randynobx's full-sized avatar

Randy Nance randynobx

View GitHub Profile
@randynobx
randynobx / m4a_to_mp3_bulk_convert
Created March 12, 2015 02:55
Bulk conversion of .m4a files in a directory to mp3 files, using ffmpeg.
for f in *.m4a; do ffmpeg -i "$f" -codec:v copy -codec:a libmp3lame -q:a 2 "${f%.m4a}.mp3"; done
@randynobx
randynobx / TmuxWindowRename
Created March 12, 2015 02:21
Patch for Ranger to reset the parent tmux window name on exit. **Does NOT grab correct name from prior to ranger start, but can be used to hard code a name to reset to
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 3898a7a..2ea5b28 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -6,6 +6,7 @@ import sys
import curses
import _curses
+from subprocess import check_output
from .displayable import DisplayableContainer
@randynobx
randynobx / fetch_ext_ip.sh
Created May 23, 2012 01:07
Fetch External IP Addr
#!/bin/bash
curl automation.whatismyip.com/n09230945.asp
echo
@randynobx
randynobx / aur_update.sh
Created May 23, 2012 00:58
AUR Update script for Arch Linux using Cower
## AUR Update
3 if [ "$(cower -u)" != "" ]; then
4 cd ~/.builds
5 cower -du
6 for f in $HOME/.builds/*/PKGBUILD; do cd $(dirname $f); makepkg -i; done
7 rm -r ~/.builds/*
8 echo 'AUR Update Complete.'
9 else
10 echo 'No package updates are available.'
11 fi