Skip to content

Instantly share code, notes, and snippets.

View dreamyguy's full-sized avatar
👨‍💻 Code-bending

Wallace Sidhrée dreamyguy

👨‍💻 Code-bending
View GitHub Profile
@dreamyguy
dreamyguy / array_dupplicate_counter.js
Last active December 17, 2019 11:40 — forked from ralphcrisostomo/array_dupplicate_counter.js
Javascript: Count duplicates in an array, ES6
// Scenario:
// You have a javascript array that likely has some duplicate values and you would like a count of those values.
const compressArray = arr => {
const compressed = [];
// make a copy of the input array
const copy = arr.slice(0);
// first loop goes over every element
for (let i = 0; i < arr.length; i++) {
let myCount = 0;
@dreamyguy
dreamyguy / .bash_profile
Created April 17, 2018 14:01 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@dreamyguy
dreamyguy / bash_profile
Created April 17, 2018 13:59 — forked from existemi/bash_profile
My preferred bash setup
#!bin/bash
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching