This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Build; | |
import android.webkit.JavascriptInterface; | |
import android.webkit.WebView; | |
import com.google.gson.Gson; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.LinkedBlockingDeque; | |
import java.util.concurrent.ThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set encoding to UTF-8 | |
for f in *.srt; do iconv -f `file --mime-encoding -b "$f"` -t UTF-8 "$f" > "$f.u"; mv "$f.u" "$f"; done | |
# Rename according to movie | |
ls *.srt | while read f; do n=`grep -o 'S..E..' <<< "$f"`; m=`ls -1 *"$n"* | grep -v "\.srt$"`; o=${m%.*}; mv "$f" "$o.srt"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" | |
} | |
export PS1='\[\033[34m\]\w \[\033[1;30m\]$(parse_git_branch)\[\033[0m\]\n\[\033[1;35m\]❯ \[\033[0m\]' | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced |