Skip to content

Instantly share code, notes, and snippets.

View gauravmehla's full-sized avatar
🚀
to the sky and beyond

Gaurav Mehla gauravmehla

🚀
to the sky and beyond
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
Elastic Load Balancer, CloudFront and Let's Encrypt
Windows 8 Preinstall Keys
=========================
Windows 8
46V6N-VCBYR-KT9KT-6Y4YF-QGJYH
Windows 8 Professional
V7C3N-3W6CM-PDKR2-KW8DQ-RJMRD
@gauravmehla
gauravmehla / GetLatLong.js
Created March 27, 2020 08:34 — forked from BastinRobin/GetLatLong.js
Get Latitude And Longitude Javascript Function
/* Get the latitude and longitude from address:
Author : Bastin Robins J
*/
// Add the link to webpage
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
//Function to covert address to Latitude and Longitude
var getLocation = function(address) {
var geocoder = new google.maps.Geocoder();
@gauravmehla
gauravmehla / aes.go
Created August 30, 2018 12:12 — forked from willshiao/aes.go
AES 256-CFB in Node.js and Golang
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"fmt"
"io"
@gauravmehla
gauravmehla / simple-nodejs-iv-encrypt-decrypt.js
Created August 23, 2018 10:40 — forked from yoavniran/simple-nodejs-iv-encrypt-decrypt.js
nodejs crypto - simple encrypt & decrypt using IV (Initialization Vector)
"use strict";
var crypto = require("crypto");
var EncryptionHelper = (function () {
function getKeyAndIV(key, callback) {
crypto.pseudoRandomBytes(16, function (err, ivBuffer) {
var keyBuffer = (key instanceof Buffer) ? key : new Buffer(key) ;
@gauravmehla
gauravmehla / AesUtil.js
Created August 23, 2018 10:23 — forked from AndiDittrich/AesUtil.js
Node.js - AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// ----------------------------------------------------------------------------------------
// the encrypted datablock is base64 encoded for easy data exchange.
// if you have the option to store data binary save consider to remove the encoding to reduce storage size
// ----------------------------------------------------------------------------------------
// format of encrypted data - used by this example. not an official format
//
// +--------------------+-----------------------+----------------+----------------+
// | SALT | Initialization Vector | Auth Tag | Payload |
// | Used to derive key | AES GCM XOR Init | Data Integrity | Encrypted Data |
@gauravmehla
gauravmehla / The Technical Interview Cheat Sheet.md
Created July 5, 2018 05:05 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@gauravmehla
gauravmehla / PhonecallReceiver.java
Created February 22, 2018 11:30 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
@gauravmehla
gauravmehla / frontendDevlopmentBookmarks.md
Created February 15, 2018 16:04 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.