I hereby claim:
- I am kra3 on github.
- I am kra3 (https://keybase.io/kra3) on keybase.
- I have a public key ASDFa3YNbsbfrmC-8WfUOSMiBDUfYeRpU7-5-EDSFXrisgo
To claim this, I am signing this object:
| // no way to reset, at the moment | |
| const get = (() =>{ | |
| let counter = 0; | |
| return (url) => { | |
| return new Promise((resolve, reject) => { | |
| if(counter > 100) { | |
| reject(false); | |
| } |
I hereby claim:
To claim this, I am signing this object:
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.
###Array ####Definition:
| { | |
| "Python": { | |
| "python": "~/.envs/<virtual_env_name>/bin/python", | |
| "pythonExtraPaths": [ | |
| "~/.envs/<virtual_env_name>/lib/python3.5/site-packages/" | |
| ] | |
| }, | |
| "folders": [ | |
| { | |
| "path": "<relative_project_path_from_this_file>", |
| # rip off from https://zeroturnaround.com/rebellabs/your-maven-build-is-slow-speed-it-up/ | |
| # 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 |
| $ reset | |
| # better way | |
| $ stty sane | |
| $ tput rs1 |
| // 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); |
| # 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 |
| // 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] ; |
| # -*- coding: utf-8 -*- | |
| __author__ = 'Arun KR (kra3) <[email protected]>' | |
| __license__ = 'Simplified BSD' | |
| import sys | |
| """ | |
| wiki_helper.py rules.txt data.txt > result.txt |