Skip to content

Instantly share code, notes, and snippets.

@bhskt
bhskt / flatten.js
Created May 9, 2019 06:27
Flatten An Arbitrarily Nested Numerical Array
function flatten( array ) {
const output = [];
if( !( array instanceof Array ) )
return false;
function recurseFlatten( array ) {
array.forEach( (el) => {
if( el instanceof Array ) {
@bhskt
bhskt / zshrc
Created November 1, 2020 05:10
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/bhskt/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
docker kill $(docker ps -q) ; docker rm $(docker ps -a -q) ; docker rmi $(docker images -q -a)
docker system prune -a --volumes