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:
<?php | |
include __DIR__ . '/threads.php'; | |
$commands = array(); | |
for ( $i=0; $i<10; $i++ ) { | |
$commands[] = "bash -c 'sleep `shuf -i 1-5 -n 1`; echo $i'"; | |
} |
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
// For info on setting up this hook, check out the docs here: http://sailsjs.org/#!/documentation/concepts/extending-sails/Hooks/usinghooks.html | |
module.exports = function (sails) { | |
return { | |
routes: { | |
before: { | |
// If you want to protect the home route as it is exposed by the swagger hook (i.e. rather than protecting a particular action) | |
// you can do so by setting a shadow route here. Note however that this hook must run BEFORE the swagger hook does. |
- name: set swap_file variable | |
set_fact: | |
swap_file: /mnt/{{ swap_space }}.swap | |
- name: check if swap file exists | |
stat: | |
path: "{{ swap_file }}" | |
register: swap_file_check | |
- name: create swap file |
#!/usr/bin/env bash | |
mysql -se "SHOW VARIABLES" -u :user -p | grep -e log_error -e general_log -e slow_query_log | |
# Response: | |
# | |
# general_log OFF | |
# general_log_file /usr/local/var/mysql55/:user.log | |
# log_error /usr/local/var/mysql55/:user.err |
$find . -type f -name "FILE-TO-FIND" -exec rm -f {} \; | |
# -iname "FILE-TO-FIND" : File pattern, case insensitive, e.g. -iname “*.png”, match all png files | |
# -exec rm -rf {} \; : Delete all files matched by file pattern. | |
# -type f : Only match files and do not include directory names. | |
Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.
Sample output:
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
#!/usr/bin/bash | |
# Jaziel Lopez, | |
# Software Engineer | |
# function __localstack_put_object() { | |
# | |
# fn="localstack-s3-put-object" | |
# | |
# echo "Localstack, storing bucket objects... please wait..."; |