Skip to content

Instantly share code, notes, and snippets.

View babhishek21's full-sized avatar
:shipit:
Ship it!

Abhishek Bhattacharya babhishek21

:shipit:
Ship it!
View GitHub Profile
@babhishek21
babhishek21 / NSIT-feedback-auto-fill.js
Last active May 28, 2016 18:22
Simple snippet to autofill the feedback forms of the online NSIT Feedback System.
/**
* Simple snippet to lazy auto fill the short, but boring feedback forms at:
* http://nsitfeedbacksystem.elasticbeanstalk.com/
*
* Usage: Define this function for the page/window you want to run it on. Call it with valid params.
* You can run it on the browser/client JS engine. This does not submit the form. So you can review changes.
*
* Warning: The function must be defined for each page/reload because the current window changes.
*
* Edit: Looks like jQuery works. So I've made it shorter!
@babhishek21
babhishek21 / range_sum_query_mutable_leetcode.cpp
Last active May 23, 2023 16:21
Range Sum Query for Mutable Arrays using Segment Trees
#include <bits/stdc++.h> // using GCC/G++11
using namespace std;
/**
* Range Sum Query for Mutable Arrays using Segment Trees (LeetCode)
* https://leetcode.com/problems/range-sum-query-mutable/
*
* Build a tree whose nodes represent the entire range. Its two children represent the two halves
* of this range. This continues down the tree with height log(n) until we reach the n individual
* leaves of the tree (each representing a single element).
@babhishek21
babhishek21 / Default.sublime-keymap
Last active January 6, 2017 18:25 — forked from bblanchon/settings.json
Sublime Text: Restore Quick Switch Project shortcut
[
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }
]
@babhishek21
babhishek21 / reverse_xxd.cpp
Last active January 29, 2017 06:44
Simulate reverse process of the xxd command
/**
* Program: Simulate reverse xxd (to convert hex dump to binary RAW file)
* Author: Abhishek Bhattacharya
*/
#include <bits/stdc++.h>
using namespace std;
unsigned int make_4_bit_binary(char &ch) {
unsigned int hexval;

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@babhishek21
babhishek21 / .gitignore
Created January 21, 2017 13:49 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

@babhishek21
babhishek21 / xclip.cpp
Created March 21, 2018 20:57
xClip (Reverse Clip) for Windows - Simulate reverse process of the clip command on Windows
/**
* xClip (Reverse Clip) for Windows
* Author: Abhishek Bhattacharya <babhishek21@yahoo.co.in>
*
* Build Environment:
* Windows 10 Version 1607 (Windows 7 or above should work fine)
* MinGW g++ (GCC) 5.3.0 or above (with flag --std=c++11)
* UPX x3.91 or above
* Runtime Environment:
* Windows 7 or above