Skip to content

Instantly share code, notes, and snippets.

@uchagani
uchagani / batch-mp3.txt
Created May 16, 2020 09:38 — forked from theodric/batch-mp3.txt
batch convert files from (e.g.) m4b to mp3 with ffmpeg and avconv
Single:
avconv -acodec libmp3lame -i test.m4b test.mp3
Batch:
for f in *m4b; do avconv -i "$f" -acodec libmp3lame ${f%.m4b}.mp3"; done
Single:
ffmpeg -i input.wav -codec:a libmp3lame -qscale:a 7 output.mp3
Batch:
@uchagani
uchagani / break.py
Created August 1, 2018 01:58 — forked from obfusk/break.py
python equivalent of ruby's binding.pry
import code; code.interact(local=dict(globals(), **locals()))
@uchagani
uchagani / solution1.md
Created October 25, 2015 19:57 — forked from MohammedJabarullah/solution1.md
Mac OS X: Docker/Boot2Docker CiscoVPN connection issue solution

Enable port forwarding on VirtualBox Machine from 2376 on host to 2376 on guest (Settings > Network > Adapter 1 NAT > Advanced > Port Forwarding), and then export the following in a shell. Docker Compose and other docker tools will work as expected.

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://localhost:2376"

For docker-machine users:

function RenameComputer($ComputerName)
{
$computer = Get-WmiObject -Class Win32_ComputerSystem
$computer.rename("$ComputerName")
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname"
New-PSDrive -name HKU -PSProvider "Registry" -Root "HKEY_USERS"