Skip to content

Instantly share code, notes, and snippets.

View milleraundra's full-sized avatar

Aundra Miller milleraundra

View GitHub Profile
@milleraundra
milleraundra / lastChristmas.js
Created January 12, 2021 05:20
Last Christmas by WHAM! as a recursive function
ChristmasThisYear(new Lover(), new Heart());
function ChristmasThisYear(baby, heart) {
baby.give(heart)
.catch((veryNextDay) => {
if (veryNextDay === 'Gave it away') {
let someoneSpecial = new Lover();
return ChristmasThisYear(someoneSpecial, heart);
// return tears
}
@milleraundra
milleraundra / KillProcessOnPort.ps1
Created March 11, 2019 16:30
Using Webstorm, sometimes I accidentally his 'Disconnect' instead of 'Terminate'. These are the commands I reuse for killing the process running on that port.
netstat -ano | findstr :<yourPortNumber>
taskkill /PID <typeyourPIDhere> /F
@milleraundra
milleraundra / boxstarter.ps1
Created October 19, 2018 18:09 — forked from willwm/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Edited by: Will Wolff-Myren <willwm@gmail.com>
# Last Updated: 2018-07-17
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
You can use the from creator and the mergeMap operator to merge an observable into the effect's Action stream.
Using your example:
@Effect() addPeopleStart$ = this.actions$
.ofType( PersonActionTypes.ADD_PERSON_LIST_START )
.switchMap(
( payload ) => {
return this.personService.getPeople();
}
@milleraundra
milleraundra / commandLine.txt
Last active April 2, 2017 17:36
Command line code to view global NPM installs
npm list -g --depth=0
@milleraundra
milleraundra / factorialrecursion.js
Last active May 17, 2016 23:25
Factorial Recursion - Reverse
function factorial(number, start = 1) {
if (start == number) {
return number;
} else {
return start * factorial(number, start + 1);
}
}