Skip to content

Instantly share code, notes, and snippets.


Abhijeet Mohan voidabhi

View GitHub Profile
voidabhi /
Created May 22, 2017 — forked from protrolium/
using ffmpeg to extract audio from video files


Converting Audio into Different Formats / Sample Rates

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:

View gist:0848ba4d9dbd66d3e32e007f6708267f

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices



Keybase proof

I hereby claim:

  • I am voidabhi on github.
  • I am voidabhi ( on keybase.
  • I have a public key ASD6YnhMOVqP8nqcsYjygYAPhRgkDmpTW66dmVENYHdKZQo

To claim this, I am signing this object:

View helpers.go
// GetBytes accepts any object (interface{]}) and returns its json encoded byte array
func GetBytes(key interface{}) ([]byte) {
var buf bytes.Buffer
enc := json.NewEncoder(&buf)
err := enc.Encode(key)
if err != nil {
return []byte("")
return buf.Bytes()
voidabhi /
Last active Feb 19, 2016
Benchmarking for python functions
import time
def print_numbers(n):
for i in xrange(n):
class BM(object):
voidabhi /
Created Feb 19, 2016
Python utility for writing to standard output
# coding=UTF-8
from stdio import stdio
stdio.write('hello world')
data =
print stdio.STDIN_FILENO
print stdio.STDOUT_FILENO
import thread
voidabhi /
Created Feb 18, 2016
Basic checkconfig commands
# list all services
chkconfig --list
# check status of specific service
chkconfig --list | grep httpd
# start perticular service on run levels
chkconfig --level 35 httpd on
View ConsoleLogger.php
namespace Logging;
use Psr\Log\AbstractLogger;
* Class ConsoleLogger
* @package Thruway
You can’t perform that action at this time.