Skip to content

Instantly share code, notes, and snippets.

View rohityadavcloud's full-sized avatar

Rohit Yadav rohityadavcloud

View GitHub Profile
@rohityadavcloud
rohityadavcloud / gist:9072b1250b7d2207bb5c
Created April 22, 2013 07:35
Convert svn repo to git
- Get authors file:
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
- Fix the authors file with alias = Name <[email protected]>
- Convert!
mkdir repo && cd repo
git svn init repo --no-metadata
git config svn.authorsfile <path to authors file>
git svn fetch
@rohityadavcloud
rohityadavcloud / termDJ
Created November 23, 2010 08:35
termDJ
# 2 Minutes Terminal Dj using cmus
mix(){ cmus-remote -n -k 40; }
dj(){ while [ 1==1 ]; do mix; sleep 16; done };
nohup cmus &
echo "Warning nohup may cause size of nohup.out in GBs when played for a longer time..."
cmus-remote -p
echo "Running termDJ, Ctrl+C to break"
dj
@rohityadavcloud
rohityadavcloud / mp4-to-mp3
Created October 18, 2010 00:35
Converts Mp4 in a dir to mp3
#! /bin/bash
#
# Converts all MP4 files in the current directory to MP3s.
#
# Uncomment to remove whitespaces in mp4 files
for video in *.MP4; do
#f=`echo $video | tr ' ' '_'`
#mv "$video" $f