Go to the course and have any video up. The following code relies on the right sidebar to be visible to uncheck all your progress.
You can do this with ctrl+shift+j
and making sure the console
tab is selected for chrome/brave
const sleep = (ms, data, useReject) => { | |
return new Promise((resolve, reject) => | |
setTimeout(() => { | |
if (useReject) { | |
reject(data); | |
} | |
return resolve(data); | |
}, ms) | |
); | |
}; |
Go to the course and have any video up. The following code relies on the right sidebar to be visible to uncheck all your progress.
You can do this with ctrl+shift+j
and making sure the console
tab is selected for chrome/brave
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
{ | |
"name": "workshop-setup", | |
"version": "1.0.0", | |
"description": "This is the common setup script for most of my workshops", | |
"bin": "./setup.js" | |
} |
subscribeToWindowResize(): void { | |
// maybe this could be run outside Angular | |
// https://blog.bitsrc.io/the-principles-for-writing-awesome-angular-components-10e45f9ae77e | |
fromEvent(window, 'resize') | |
.pipe( | |
debounceTime(1000), | |
tap(() => this.redrawChart()), | |
takeUntil(this.cmpDestroyed$) | |
) | |
.subscribe(); |
This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:
*nix
based command prompt (but not the default Windows Command Prompt!)cd ~/.ssh
. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\
on Windows).ssh
folder, there should be these two files: id_rsa
and id_rsa.pub
. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls
to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa
and id_rsa.pub
in order for Git, GitHub, and BitBucket to recognize them by default.ssh-keygen -t rsa -C "[email protected]"
. Thimport {Injectable} from '@angular/core'; | |
import {DateAdapter} from '@angular/material'; | |
import {addDays, addMonths, addYears, format, getDate, getDaysInMonth, getMonth, getYear, parse, setDay, setMonth, toDate} from 'date-fns'; | |
// CONFIG. Use environment or something for a dynamic locale and settings | |
import {es as locale} from 'date-fns/locale'; | |
const WEEK_STARTS_ON = 1; // 0 sunday, 1 monday... | |
export const MAT_DATE_FNS_DATE_FORMATS = { |
/* | |
* this will ensure that the page doesn't jump left and right when | |
* navigating between the pages with and without the scrollbar | |
*/ | |
html { | |
overflow-x: hidden; | |
width: 100vw; | |
} |
/** | |
* @param fn - a pure (no side effects) function you want to memoize | |
* if you run a memoized function again with the same arguments, | |
* it will return the cached result instead of running the computation | |
*/ | |
const memoize = fn => { | |
const cache = {}; | |
return (...args) => { | |
const key = JSON.stringify(args); |
const headers = new HttpHeaders() | |
.set('Content-Type', 'application/json') | |
.set('Access-Control-Allow-Origin', '*') | |
.set('Access-Control-Allow-Headers', 'Access-Control-Allow-Headers'); |