Skip to content

Instantly share code, notes, and snippets.

@theUncanny
theUncanny / subtitles-renamer.sh
Created July 21, 2016 23:12 — forked from colinux/subtitles-renamer.sh
Rename subtitles files according to tv shows names found in a directory
#!/bin/bash
# Renames subtitles files according to tv shows names found in a directory
# Acceped syntaxes for season/episode are: 304, s3e04, s03e04, 3x04 (case insensitive)
#
# Usage:
# Put this gist somewhere in your $PATH, like /usr/local/bin/subtitles-renamer
# Chmod +x it
# cd ~/YourHolidaysTvShowsWithSubtitles
# subtitles-renamer
@theUncanny
theUncanny / golang-cheat.md
Created July 16, 2016 09:39 — forked from ciaranarcher/golang-cheat.md
golang cheatsheet

Types

type Vertex struct {
    Lat, Long float64
}

Maps

@theUncanny
theUncanny / install_ffmpeg_ubuntu.sh
Created June 1, 2016 21:47 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@theUncanny
theUncanny / ffmpeg-updater.sh
Created June 1, 2016 21:46 — forked from maxwelleite/ffmpeg-updater.sh
Simple bash script to install the latest static version of FFmpeg (from http://ffmpeg.gusari.org/static/)
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.tumblr.com/
# Description: Simple bash script to install the latest static version of FFmpeg (from http://ffmpeg.gusari.org/static/)
# Dependencies: wget
# Tested: Ubuntu Saucy
if [[ $EUID -ne 0 ]]; then
echo -e "You must be a root user!\nTry: sudo ./ffmpeg-update.sh" 2>&1
exit 1
@theUncanny
theUncanny / bootstrap_for_encoding_server.sh
Created June 1, 2016 21:46 — forked from drakeguan/bootstrap_for_encoding_server.sh
Bash script to install latest version of ffmpeg, x264 and libvpx on Ubuntu 14.04 server
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 14.04
# Copyright @ 2014 Shuen-Huei (Drake) Guan <[email protected]>
# References:
# * https://gist.github.com/xdamman/e4f713c8cd1a389a5917
# * https://blog.dlasley.net/2013/05/install-ffmpeg-from-source/
# * http://fermat-little-theorem-blog.logdown.com/posts/203069-solved-when-building-gpac-suffer-usr-local-lib-libswscalea-error-adding-symbols-bad-value
@theUncanny
theUncanny / ppainstall.sh
Created May 14, 2016 19:02 — forked from rrevanth/ppainstall.sh
Elementary OS PPA script
#!/bin/bash
# Fixes sudo issues
if (($EUID != 0)); then
if [[ -t 1 ]]; then
sudo "$0" "$@"
else
exec 1>output_file
gksu "$0 $@"
fi