Skip to content

Instantly share code, notes, and snippets.

View vikas-0's full-sized avatar

Vikas Kumar vikas-0

View GitHub Profile
@vikas-0
vikas-0 / deletebranches.sh
Created December 28, 2020 10:54
Delete all branches which has been delete remotely
git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -D
@vikas-0
vikas-0 / webm2gif.sh
Created September 30, 2017 13:57
Script to convert webm to animated gif
ffmpeg -y -i $1 -vf palettegen /tmp/palette.png
ffmpeg -y -i $1 -i /tmp/palette.png -filter_complex paletteuse -r 10 $2
@vikas-0
vikas-0 / base10toN.py
Created November 9, 2016 08:00
Convert Decimal to any Base in Python
def base10toN(num,n):
"""Change a to a base-n number.
Up to base-36 is supported without special notation."""
num_rep={10:'a',
11:'b',
12:'c',
13:'d',
14:'e',
15:'f',
16:'g',
@vikas-0
vikas-0 / ram_tb.vhd
Last active November 4, 2015 19:50
16x4 RAM VHDL XILINX
-- test bench solution to ex09
library IEEE;
use IEEE.Std_logic_1164.all;
use IEEE.Numeric_std.all;
entity Ram_TB is
end entity Ram_TB;
architecture Bench of Ram_TB is