Skip to content

Instantly share code, notes, and snippets.

View nsrCodes's full-sized avatar
😅
Probably thinking

Navdeep Singh Rathore nsrCodes

😅
Probably thinking
View GitHub Profile
@nsrCodes
nsrCodes / harTypes.ts
Created April 28, 2023 10:49
Typescript interfaces for working with the HAR v1.2. Based on https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md
/**
* Based on Har v1.2
*
* Detailed specification references can be founnd at:
* http://www.softwareishard.com/blog/har-12-spec/
* https://github.com/ahmadnassri/har-spec
*
* Note: All the optional attributes in the interfaces
* are also optional in the spec
*/
@nsrCodes
nsrCodes / Plan.txt
Last active June 11, 2021 17:27
If you have ever exported data from trello, you know that it is the worst structured json that you will ever see. I was trying to make sense from all that data while shifting from trello to github discussions but this is the overall structuring result complete
# Actual structure
*Important parts*
{
id,
name,
desc,
cards {
@nsrCodes
nsrCodes / daily_insta.py
Created June 11, 2021 15:28
Setup daily post using linux cron jobs
```
Cron job needs to be setup to run everytime PC boots.
Script should be in the same file as all the pictures.
Pictures should be named 1,2,3... and the captions json should have captions with those numbers as keys.
```
import json
from instabot import Bot
from datetime import date
import requests
@nsrCodes
nsrCodes / bmi.py
Created March 25, 2021 04:46
Python script to add a bmi column to the end of an excel sheet that was generated from a google form submissionsexcel sheet
'''
This is a script written to calculate bmi from form responses.
'''
import pandas as pd
# Constants
source_file_name = "data.xlsx"
form_name = 'Form Responses 1'
height_column_name = ' 1. Height in cm'
@nsrCodes
nsrCodes / GetQueryParams.js
Created February 9, 2021 14:42
General Utils
function getQueryParamsAsMap() {
let queryParams={};
var params = new URLSearchParams(window.location.search);
params.forEach((value, key) => {queryParams[key] = value})
return queryParams
}