Skip to content

Instantly share code, notes, and snippets.

Abhijeet Mohan voidabhi

Block or report user

Report or block voidabhi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

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

ffmpeg

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

ASCII

View keybase.md

Keybase proof

I hereby claim:

  • I am voidabhi on github.
  • I am voidabhi (https://keybase.io/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
voidabhi / benchmark.py
Last active Feb 19, 2016
Benchmarking for python functions
View benchmark.py
import time
def print_numbers(n):
for i in xrange(n):
pass
class BM(object):
@voidabhi
voidabhi / stdio.py
Created Feb 19, 2016
Python utility for writing to standard output
View stdio.py
# coding=UTF-8
"""
@example
from stdio import stdio
stdio.write('hello world')
data = stdio.read()
print stdio.STDIN_FILENO
print stdio.STDOUT_FILENO
"""
import thread
@voidabhi
voidabhi / checkconfig.sh
Created Feb 18, 2016
Basic checkconfig commands
View checkconfig.sh
#!/bin/bash
# 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
<?php
namespace Logging;
use Psr\Log\AbstractLogger;
/**
* Class ConsoleLogger
*
* @package Thruway
You can’t perform that action at this time.