Skip to content

Instantly share code, notes, and snippets.

View minademian's full-sized avatar

Mina Demian minademian

View GitHub Profile
@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'
@khamidou
khamidou / exponential_backoff.rb
Last active April 21, 2022 13:44 — forked from nathanl/exponential_backoff.rb
Exponential backoff with jitter in Ruby
# Exponential backoff in Ruby
begin
make_request
rescue RequestError => e
if retries <= max_retries
retries += 1
sleep 2 ** retries + rand(20)
retry
else
raise "Timeout: #{e.message}"
@leoforney
leoforney / install icu4c
Last active June 24, 2017 21:51
Installing icu4c (AKA libicu) on dreamhost
#!/bin/shell
echo "Hey, I heard you want to install libicu on Dreamhost... Let me help you out! :D"
if [ ! -d "$HOME/usr/local" ]; then
mkdir -p ~/usr/local
fi
if [ -d "$HOME/icu" ]; then
echo "Removing the folder ~/icu..."