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:
| def trace_calls_on | |
| scope = {} | |
| trace = TracePoint.new(:call, :line) do |tp| | |
| case tp.event | |
| when :call then puts "#{tp.path}:#{tp.lineno} #{tp.defined_class}::#{tp.method_id} " \ | |
| "called from #{scope[:path]}:#{scope[:lineno]} #{scope[:class]}::#{scope[:method_id]}" | |
| when :line then scope = { | |
| event: :line, | |
| lineno: tp.lineno, | |
| path: tp.path, |
| defmodule Chain do | |
| defmacro chain(ex) do | |
| parse(ex) | |
| end | |
| defp parse({:., _, [first_arg, function_name]}, more_args) do | |
| args = [first_arg|more_args] |> Enum.map(&parse/1) | |
| apply(String, function_name, args) | |
| end | |
| -module(hello). | |
| -export([hello/1]). | |
| hello(robert) -> | |
| io:format("Hello, Mike."); | |
| hello(joe) -> | |
| io:format("Hello, Robert."); | |
| hello(mike) -> | |
| io:format("Hello, Joe."). |
| #!/usr/bin/env bash | |
| set -x | |
| term_handler() { | |
| echo "Stopping the server process with PID $PID" | |
| erl -noshell -name "[email protected]" -eval "rpc:call('[email protected]', init, stop, [])" -s init stop | |
| echo "Stopped" | |
| } | |
| trap 'term_handler' TERM INT |
| echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z |
| #!/bin/env ruby | |
| # Logs the number of queued and active connections on the unicorn socket to statsd. | |
| # There's a cap on the number of queued connections. If we hit it then nginx will | |
| # start serving 504 pages | |
| # | |
| # There is no visible output, but data is sent to statsd each second | |
| # | |
| # Props to Tim Lucas for the basic structure: | |
| # |
| I think you mean team... | |
| I think you mean squad.. | |
| I think you mean gang... | |
| I think you mean pals... | |
| I think you mean buds... | |
| I think you mean posse... | |
| I think you mean phalanx... | |
| I think you mean crew... | |
| I think you mean crüe... | |
| I think you mean nerds... |
| curl --silent 'https://www.wikidata.org/w/api.php?action=wbsearchentities&search=ch&format=json&language=en&type=item&continue=0' | python -m json.tool | |
| { | |
| "search": [ | |
| { | |
| "aliases": [ | |
| "encyclopaedia", | |
| "encyclop\u00e6dia" | |
| ], | |
| "description": "type of reference work", | |
| "id": "Q5292", |
| defmodule MyBlog.Repo.Migrations.CreatePost do | |
| use Ecto.Migration | |
| def change do | |
| create table(:posts, primary_key: false) do | |
| add :id, :uuid, primary_key: true | |
| add :body, :string | |
| add :word_count, :integer | |
| timestamps |