Skip to content

Instantly share code, notes, and snippets.

Technowise / cowin_schedule_v3.js
Last active May 17, 2021 — forked from debarko/cowin_schedule_district_wise.js
Get an update on console as soon as a slot opens up in . Login to the website and then run this script on Console.
View cowin_schedule_v3.js
// This script will alert you whenever some slot opens up on the given date within the given pincodes
// Change the pincodes to your needs as per your city
// Optionally: the next_days variable can be set to number of days it has to check. (If you set to 3, will check for next three days.)
// How To setup Video ->
// Steps to use
// 1. Update Config
// 2. Login to
// 3. Rigt Click on the website
import mysql.connector
#CA Bundle file is provided on AWS documentation for RDS:
cnx = mysql.connector.connect(user='db-user', password='xxxx',
database='db-user', ssl_ca=SSL_CA)
Technowise / play-framework-init.d-script
Created Jan 4, 2017
Play Framework init.d script - Run play application as service in Linux, so that you do not have to do a lot of manual stuff
View play-framework-init.d-script
#To use this script:
#1) Save this file with name of your app in /etc/init.d folder.
#2) Update the APP_NAME to the name of your application in build.sbt.
#3) Update the APP_PATH of the application to the path where you extracted your dist version/snapshot.
#4) Update the value of PORT to the port you would like your application to run on.
#5) Add this script as service using update-rc.d. (Example: sudo update-rc.d your-app defaults).
Technowise /
Created Oct 12, 2016
Shell script to import all MongoDB json files in current folder to remote database
ls -1 *.json | sed 's/.json$//' | while read col; do
mongoimport --host --username john --password sample-password --db sample-db --collection $col --file $col.json
echo $cmd
Technowise / validate_fb_auth_token.php
Created May 10, 2013
Validate Facebook Auth-Token. This helper function checks if the Facebook auth-token is valid, and belongs to the said facebook-id
View validate_fb_auth_token.php
// A helper function to validate Facebook Auth-Token.
// This checks if the Facebook auth-token is valid, and belongs to the said facebook-id
function is_facebook_auth_valid($facebook_token, $facebook_id)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);