Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Arun Karunagath kra3

I may be slow to respond.
View GitHub Profile
View get-unique-strings-from-api.js
// no way to reset, at the moment
const get = (() =>{
let counter = 0;
return (url) => {
return new Promise((resolve, reject) => {
if(counter > 100) {

Keybase proof

I hereby claim:

  • I am kra3 on github.
  • I am kra3 ( on keybase.
  • I have a public key ASDFa3YNbsbfrmC-8WfUOSMiBDUfYeRpU7-5-EDSFXrisgo

To claim this, I am signing this object:

kra3 / The Technical Interview Cheat
Created Feb 17, 2017 — forked from tsiege/The Technical Interview Cheat
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.
View The Technical Interview Cheat

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.
kra3 / sublime_py_proj_with_venv.json
Created Jan 5, 2017
Sublime project settings - python project with virtualenv
View sublime_py_proj_with_venv.json
"Python": {
"python": "~/.envs/<virtual_env_name>/bin/python",
"pythonExtraPaths": [
"folders": [
"path": "<relative_project_path_from_this_file>",
kra3 / maven
Last active Nov 6, 2018
Speed up maven build times.
View maven
# rip off from
# in .bashrc
set MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
# add -DdependencyLocationsEnabled=false to retain fewer outgoing connections.
# compile all modules
mvn -T 1C install -offline
kra3 / flatten.js
Created Dec 13, 2016
flatten a nested array
View flatten.js
// function definition ES6
let flatten = (arr, res=[]) => {
for(let itm of arr){
Array.isArray(itm)? flatten(itm, res): res.push(itm);
// calling the function
let result = [];
flatten([1,2, [3, 4], [5, [6, 7, [8, 9]]]], result);
kra3 /
Created Mar 7, 2016
Try recovering a misbehaving tmux attach
# to try recover a closed tmux session
# if the attach is not working while the socket is still there
# at /tmp/tmux-XXX/<default>
killall -10 tmux
kra3 / py_unquote.js
Last active Aug 29, 2015
urllib.unquote in JavaScript
View py_unquote.js
// LICENCE: BSD 3 Clause
var _hexDig = "0123456789ABCDEFabcdef";
var _hexToChar = {};
var i, j;
// generate convertion map
for(i in _hexDig){
for(j in _hexDig){
var key = _hexDig[i] + _hexDig[j] ;
kra3 /
Last active Oct 29, 2017
A generic script for text processing originally written specific to some usecases around wiki text.
# -*- coding: utf-8 -*-
__author__ = 'Arun KR (kra3) <>'
__license__ = 'Simplified BSD'
import sys
""" rules.txt data.txt > result.txt