Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
yum install gcc gcc-g++ make git | |
cd /opt | |
git clone git://github.com/cjdelisle/cjdns.git | |
cd cjdns | |
./do | |
./cjdroute --genconf > /etc/cjdroute.conf | |
curl https://gist.github.com/ryansb/5422219/raw/4f8c788ce6d608e6e9539238ec8b39b6e13e4de2/cjdns > /etc/init.d/cjdns |
alias untar='tar -zxvf' | |
alias untarxz='tar -xJf' | |
alias pbcopy='xclip -selection clipboard' # OSX compatibility | |
alias pbpaste='xclip -selection clipboard -o' # OSX compatibility | |
alias orphans='sudo pacman -Rs $(pacman -Qdtq)' # removes orphan packages from Archlinux |
#!/usr/bin/bash | |
# Convert *.gif into *.mp4, skip if already exists. | |
outdir="." | |
for path in *.gif; do | |
out="${outdir}/${path/.gif/}.mp4" | |
[[ -f "$out" ]] && continue | |
ffmpeg -f gif -i "${path}" "${out}" | |
done |
;;; This script by Paul Biggar, available at https://gist.github.com/pbiggar/6323088a31d689c61a24 | |
;;; | |
;;; This converts Evernote files into plaintext (not really markdown), so you can move your stuff out of evernote into a markdown editor. | |
;;; | |
;;; First, export your Evernotes, using File -> export notes. Export them into "My Notes.enex". | |
;;; copy this file into the same direcory as "My Notes.enex". | |
;;; | |
;;; To run this file, you'll need some dependencies, but they should only take a moment to install. | |
;;; leinigen: On OSX, use "brew install leiningen". | |
;;; lein-exec: From the terminal, run `mkdir ~/.lein; echo '{:user {:plugins [[lein-exec "0.3.5"]]}}' > ~/.lein/profiles.clj |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.OutputStreamWriter; | |
import java.util.EnumSet; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.parsers.ParserConfigurationException; | |
import org.json.JSONArray; |
:: | |
:: This script installs wormhole (https://github.com/warner/magic-wormhole) and | |
:: its prerequisites. Run this as an administrator. | |
:: | |
:: Install chocolatey. | |
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
:: Install Python 3. | |
choco install -y python |
# sudo apt-get install obfs4proxy obfsproxy tor | |
# sudo vi /etc/tor/torrc | |
UseBridges 1 | |
ClientTransportPlugin obfs3 exec /usr/bin/obfsproxy managed | |
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy managed | |
# send email to bridges@torproject.org with body `get transport obfs4` you can get new bridges. | |
bridge obfs4 195.154.49.15:44705 BACD07DACE996093DC7635F33A98C49... cert=xc/wtKNWADfJQf232xSXT0WpzsaINw6fgPvZBy5Rkw4.../ypaZPDug9L... iat-mode=0 |
# Requirements: pip install tweepy fuzzywuzzy python-Levenshtein | |
import tweepy | |
import re | |
from fuzzywuzzy import fuzz | |
# Credentials go here (generate at: https://apps.twitter.com) | |
auth = tweepy.OAuthHandler('consumer_key', 'consumer_secret') | |
auth.set_access_token('access_token', 'access_token_secret') | |
# Connect to Twitter |
#!/bin/bash | |
# https://unix.stackexchange.com/questions/40638/how-to-do-i-convert-an-animated-gif-to-an-mp4-or-mv4-on-the-command-line/294892#294892 | |
ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4 |