Skip to content

Instantly share code, notes, and snippets.

View vigneshwaranr's full-sized avatar

Vigneshwaran Raveendran vigneshwaranr

View GitHub Profile
@vigneshwaranr
vigneshwaranr / blockingqueue.rb
Created August 22, 2015 14:47
This Class is just my exercise to try ConditionVariable in Ruby
require 'thread'
#This Class is just my exercise to try ConditionVariable
class BlockingQueue
def initialize
@queue = Queue.new
@semaphore = Mutex.new
@condition = ConditionVariable.new
end
@vigneshwaranr
vigneshwaranr / migrator.sh
Created August 24, 2012 18:34
Script to convert SQLITE dumps into PostgreSQL compatible dumps
#! /bin/sh
usage_error () {
echo 'Usage: sh migrator.sh <path to sqlite_to_postgres.py> <path to sqlite db file> <an empty dir to output dump files>'
echo
echo 'Example:'
echo '>sh migrator.sh sqlite_to_postgres.py ~/reviewboard.db /tmp/dumps'
echo
echo 'Tested on:'
echo 'Python 2.7.3'