Skip to content

Instantly share code, notes, and snippets.

View Vision-X's full-sized avatar

Michael Marlow Vision-X

View GitHub Profile
#!/bin/bash
PACKAGES=$(cat "${1:-/dev/stdin}" | \
grep "require([\"'][^'\"]*.)" | \
sed 's/^[^(]*(.//g' | \
sed 's/.[\)]*[a-zA-Z;]*$//' | \
sed "s/.[)].*$//" | \
sort | uniq)
# Remove NodeJS built-ins
@Vision-X
Vision-X / sorting-algos.md
Created June 19, 2019 17:04 — forked from justsml/sorting-algos.md
Passing the Tech Screen: Big-O & Sorting algorithms

Sorting algorithms are hard to memorize.

So here's a template for tracking the important differences.

Algo. Name Big-O (worst case) Suitable for large sets? Good for partially/mostly sorted data? Totally random data? Notes
Bubble O(n^2) ๐Ÿ‘Ž ๐Ÿ˜ž ๐Ÿ˜ Simple/not-ideal for large data sets
@Vision-X
Vision-X / Install Composer to use MAMP's PHP.md
Created March 15, 2019 23:25 — forked from kkirsche/Install Composer to use MAMP's PHP.md
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line: