Skip to content

Instantly share code, notes, and snippets.

View adilbaig's full-sized avatar
👪

Adil Baig adilbaig

👪
View GitHub Profile
@adilbaig
adilbaig / git-updater
Last active November 30, 2023 12:49
A bash script to update your git repos in the background. It also pops up a user notification when a repo is synced
#!/bin/bash
# This is required for `notify-send` to work from within a cron.
# http://askubuntu.com/questions/298608/notify-send-doesnt-work-from-crontab/346580#346580
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";
# syncAndWink
#
# Syncs all remotely-tracked branches on a git repo passed as first argument ($1). It also pulls any new branches
# and tags attached to the repo.
@adilbaig
adilbaig / setup-rabbitmq-cluster.sh
Created January 3, 2015 16:15
A complete bash script to setup a RabbitMQ cluster from scratch. Takes user-defined servers at run time.
#!/bin/bash
set -e
# This script is part of my blog post :
# http://thoughtsimproved.wordpress.com/2015/01/03/tech-recipe-setup-a-rabbitmq-cluster-on-ubuntu/
# It sets up a RabbitMQ cluster by connecting to user-provided master and slave servers
# and ringing them up to a cluster on the fly.
# RabbitMQ Clustering is described in detail here :
%%%------------------------------------------------------------------------
%%% File : mod_warm_bindings.erl
%%% Author : Theo Cushion <theo@jivatechnology.com>
%%% Purpose : Enables the creation of authenticated BOSH sessions via HTTP
%%% Created : 29/01/2010
%%%------------------------------------------------------------------------
-module(mod_warm_bindings).
-author('theo@jivatechnology.com').