Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
munching code

Jatin K Malik jatinkrmalik

👨‍💻
munching code
View GitHub Profile
@jatinkrmalik
jatinkrmalik / razorpay.py
Last active Oct 10, 2017
Implementing RazorPay client in Python3
View razorpay.py
# Razorpay docs:
# https://github.com/razorpay/razorpay-python
# https://docs.razorpay.com
import razorpay # pip3 install razorpay
api_key = '<enter your api key here>'
api_secret = '<enter your api secret here>'
class RazorPay:
@jatinkrmalik
jatinkrmalik / prettyPrint.py
Last active Oct 17, 2017
Pretty print python3 dictionary
View prettyPrint.py
import json
def prettyPrint(dct):
print(json.dumps(dct, indent=4, sort_keys=True))
if __name__ == "__main__":
sample = {'name':'Jatin K Malik', 'age':25, 'id':1299, 'address':'Delhi, India', 'phone':9999999999, 'hobbies':'Code'}
prettyPrint(sample)
@jatinkrmalik
jatinkrmalik / README-Template.md
Created Nov 8, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jatinkrmalik
jatinkrmalik / db.py
Created Aug 13, 2018
Redshift and Mysql from a single DB class in python
View db.py
import psycopg2
import pymysql
class Database(object):
def __init__(self, host_name, user_name, database_name, password, port):
self.host_name = host_name
self.user_name = user_name
self.database_name = database_name
self.password = password
@jatinkrmalik
jatinkrmalik / tally_backup.py
Created Oct 30, 2019
This auto backups the zip and folder for tally data
View tally_backup.py
#!/usr/bin/env python3
"""tally_backup.py: this auto backups the zip and folder for tally data."""
__author__ = "Jatin Kumar Malik (@jatinkmalik)"
import os
import zipfile
import shutil
@jatinkrmalik
jatinkrmalik / archive.js
Last active Sep 25, 2021
Bulk archive old facebook posts
View archive.js
// Bulk archive old facebook posts
// Writen by: @jatinkrmalik
// # Usage guide:
// 1. Open https://www.facebook.com/<your_user_id>/allactivity/
// 2. Click on "Manage activity" in the left panel.
// 3. Make sure "Your posts" is selected.
// 4. Execute the script in dev console.
// 5. ???
// 6. PROFIT!
@jatinkrmalik
jatinkrmalik / addAllConnections.js
Created Sep 25, 2021
Bulk add everyone on "My Network" tab on LinkedIn
View addAllConnections.js
/*#### Bulk add everyone on "My Network" tab on LinkedIn ####*/
// ---==== Steps to use ====---
// 1. Go to https://www.linkedin.com/mynetwork/
// 2. Open Dev Console in your browser. Google "how to open dev console in <your-browser-name> for instructions".
// 3. Go to Console tab.
// 4. Paste the oneliner below into the console window and press enter.
// 5. ???
// 6. Profit.