Skip to content

Instantly share code, notes, and snippets.

View sankalp-khare's full-sized avatar

Sankalp Khare sankalp-khare

View GitHub Profile
@sankalp-khare
sankalp-khare / bms-imax-checker.py
Created July 18, 2012 03:22
Bookmyshow Checker for Prasadz IMAX
#!/usr/bin/env python
# Author : Sankalp Khare
# Date : [2012-07-12 Thu]
# Pass the movie id (can be easily found on bookmyshow) to this script plus a
# date, and it will run in a loop, checking if bookings for the said movie are
# open on the given date. If yes, it will notify you of the same via
# notify-send
@sankalp-khare
sankalp-khare / tvrage.py
Created August 23, 2012 20:07
tvrage script
#!/usr/bin/python
# Author: Sankalp Khare
# Email: sankalpkhare@gmail.com
import sys
import urllib2
import re
import datetime
from optparse import OptionParser
#!/bin/bash
# checks if there are any changes...
NUMVIDZ=$(curl -s http://www.youtube.com/channel/UC_1vMv4Al_96QgYzkFjh99w/videos | grep "href=\"/watch?[^ ]*$")
while [[ 1 ]]
do
sleep 5m
NEWNUMVIDZ=$(curl -s http://www.youtube.com/channel/UC_1vMv4Al_96QgYzkFjh99w/videos | grep "href=\"/watch?[^ ]*$")
; <<>> DiG 9.8.1-P1 <<>> +trace microsoft.com
;; global options: +cmd
. 150227 IN NS i.root-servers.net.
. 150227 IN NS e.root-servers.net.
. 150227 IN NS h.root-servers.net.
. 150227 IN NS j.root-servers.net.
. 150227 IN NS a.root-servers.net.
. 150227 IN NS d.root-servers.net.
. 150227 IN NS g.root-servers.net.
#!/usr/bin/env python
# Author : Sankalp Khare
# Date : [2014-03-05 Wed]
def genFunc():
"""This function generates 3 values (no loop, just to illustrate that its
execution freezes, then resumes)"""
yield ">> Yo Mihira!"
#!/bin/bash
# GTK+ and Firefox for Amazon Linux
# Written by Joseph Lawson 2012-06-03
# http://joekiller.com
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/
# modified by Sankalp Khare [2014-04-11 Fri]
# http://web.iiit.ac.in/~sankalp_k/
# chmod 755 ./gtk-firefox.sh
#!/bin/bash
# Author : Sankalp Khare
# Date : [2014-04-16 Wed]
read input
echo $input
#!/bin/bash
# Author : Sankalp Khare
# Date : [2014-04-25 Fri]
# Installs mongodb for ubuntu/mint
function mongodb_install(){
echo -e "${purple}=========${nc}"
echo -e "${orange}[setup] mongodb${nc}"
#!/bin/bash
set -o errexit
# toggles between httpd 2.2.x and 2.4.x
# 2.2.x packages
# httpd.x86_64 2.2.26-1.1.amzn1 @amzn-updates
# httpd-devel.x86_64 2.2.26-1.1.amzn1 @amzn-updates
@sankalp-khare
sankalp-khare / git-change-url
Last active October 29, 2022 07:16
Changes the git url type from https to ssh or vice versa
#!/usr/bin/env bash
# Utility to change the connection method for a git repo.
# === Colour Definitions ===
red='\e[0;31m'
green='\e[0;32m'
purple='\e[0;35m'
orange='\e[0;33m'
# No Color, i.e. turn off color