Skip to content

Instantly share code, notes, and snippets.

View nik-hil's full-sized avatar
🏠
Working from home

Nikhil nik-hil

🏠
Working from home
View GitHub Profile
@nik-hil
nik-hil / aws_sg_recipe.py
Created November 24, 2015 10:04 — forked from steder/aws_sg_recipe.py
Create and update AWS security groups using Python and Boto.
#!/usr/bin/env python
"""
Recipe for creating and updating security groups programmatically.
"""
import collections
import boto
@nik-hil
nik-hil / workflows-in-django.md
Created February 17, 2016 09:08 — forked from Nagyman/workflows-in-django.md
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)
@nik-hil
nik-hil / Google Colab SSH
Created July 4, 2019 04:46 — forked from yashkumaratri/Google Colab SSH
SSH into google colab
#CODE
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
@nik-hil
nik-hil / cowin_schedule_v3.js
Created May 5, 2021 10:21 — forked from debarko/cowin_schedule_district_wise.js
Get an update on console as soon as a slot opens up in https://selfregistration.cowin.gov.in/ . Login to the website and then run this script on Console.
// 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
// Change the dateArr to add your convinent set of dates
// For further update do checkout http://twitter.com/debarko/
// Steps to use
// 1. Update Config
// 2. Login to https://selfregistration.cowin.gov.in/
// 3. Rigt Click on the website