- using
pkgutil
# list all your installed packages
pkgutil --pkgs
# show your package info
pkgutil --pkg-info Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
| # find . -type d -exec ls -dF "{}" \; >>filefolderlist.txt | |
| grep "/$" filefolderlist.txt | cut -d/ -f1-3 | sort | uniq -c | |
| # https://twitter.com/climagic/status/1122941154222325766 |
| #!/usr/bin/env ruby -wKU | |
| # | |
| # by Kelan Champagne http://yeahrightkeller.com | |
| # with edits by sjschultze | |
| # and advanced metadata handling by lukf | |
| # | |
| # A script to generate a personal podcast feed, hosted on Dropbox | |
| # | |
| # Inspired by http://hints.macworld.com/article.php?story=20100421153627718 | |
| # |
| #!/bin/bash | |
| if ((${EUID:-0} || "$(id -u)")); then | |
| echo You are not root. | |
| else | |
| echo Hello, root. | |
| fi | |
| #Also: | |
| # function amIRoot() { | |
| # ! ((${EUID:-0} || "$(id -u)")) |
| #!/bin/bash | |
| function jsonval { | |
| temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
| echo ${temp##*|} | |
| } | |
| json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
| prop='profile_image_url' | |
| picurl=`jsonval` |
| #!/bin/bash | |
| # ------------------------------------------------------------------ | |
| # [Author] Title | |
| # Description | |
| # ------------------------------------------------------------------ | |
| set -e | |
| SUBJECT=some-unique-id |
| #!/bin/bash | |
| # Author: Craig Russell | |
| # Email: [email protected] | |
| # Date: yyyy-mm-dd | |
| # Usage: script.sh [-a|--alpha] [-b=val|--beta=val] | |
| # Description: | |
| # | |
| # | |
| # |
| <?php | |
| $iter = 500000; | |
| $start = microtime(true); | |
| $n = 0; | |
| for ($c=0; $c<7*$iter; $c++) { | |
| $i = $c % 16; | |
| if ($i===0) $n += 0; |
| import requests, json | |
| from pprint import pprint | |
| from urllib.request import Request, urlopen | |
| import csv | |
| import os | |
| import timeit | |
| def getInput(file): | |
| '''Opens the file, produces list of lines in the file, removes the header row, and returns the list''' | |
| inFile = open(file) |