Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View arabindadora's full-sized avatar

Arabinda Dora arabindadora

View GitHub Profile
@arabindadora
arabindadora / Makefile
Created November 8, 2023 20:35 — forked from alexedwards/Makefile
Boilerplate Makefile for Go projects
# Change these variables as necessary.
MAIN_PACKAGE_PATH := ./cmd/example
BINARY_NAME := example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@arabindadora
arabindadora / extract.js
Created May 3, 2020 12:37
Extract Chrome tabs from Android
/**
* @author nullv01d
* Purpose: Extract Google Chrome tabs from an Android device
* Tested on: Google Chrome 81 on Computer
* Steps:
* 1. Enable USB debugging on your Android device and connect it with the computer
* 2. Open Google Chrome on the computer and goto chrome://inspect/#devices
* 3. Make sure "Discover USB devices" is enabled
* 4. The Android device's name and Chrome tabs' names and links should appear
* 5. Open a Chrome DevTools Console and run the code below
@arabindadora
arabindadora / es6kata-40.js
Created August 28, 2016 21:24
solution for kata #40 at http://es6katas.org/
// 40: iterator - one example usage. Build an iterable and use it with some built-in ES6 constructs.
// To do: make all tests pass, leave the assert lines unchanged!
// Consumable users:
// - `consumableUser` contains a consumable user,
// - `anyLeft` tells if there is any user left that can be consumed.
class ConsumableUsers {
constructor() {
this.users = ['Alice', 'Bob'];
}
@arabindadora
arabindadora / inplace_merge_sort.py
Last active October 3, 2015 20:53 — forked from m00nlight/gist:a076d3995406ca92acd6
Python merge sort in place, so space complexity is O(1)
import random
def merge_sort(xs):
"""Inplace merge sort of array without recursive. The basic idea
is to avoid the recursive call while using iterative solution.
The algorithm first merge chunk of length of 2, then merge chunks
of length 4, then 8, 16, .... , until 2^k where 2^k is large than
the length of the array
"""