Skip to content

Instantly share code, notes, and snippets.

View joshwiens's full-sized avatar

Joshua Wiens joshwiens

View GitHub Profile
@joshuataylor
joshuataylor / app.js
Created October 23, 2017 12:31
Preact component to notify user when a change has been made, and on route change reload the page.
import { h, Component } from 'preact';
import { Router } from 'preact-router';
import Header from './header';
import Home from '../routes/home';
import Profile from '../routes/profile';
import NotifyChange from "./NotifyChange/index";
// import Home from 'async!../routes/home';
// import Profile from 'async!../routes/profile';
if (typeof window!=='undefined' && navigator.serviceWorker && navigator.serviceWorker.controller) {
let reloadOnNext = false;
let pushState = history.pushState;
history.pushState = function(state, title, url) {
pushState.call(this, state, title, url);
if (reloadOnNext===true) location.reload(true);
};
navigator.serviceWorker.controller.addEventListener('statechange', e => {
@TheLarkInn
TheLarkInn / ProfilingPlugin.js
Last active May 12, 2018 05:27
Profiling Plugin
const chalk = require("chalk");
const { performance } = require("perf_hooks");
class ProfilingPlugin {
apply(compiler) {
// Compiler Hooks
Object.keys(compiler.hooks).forEach(hookName => {
compiler.hooks[hookName].intercept(makeInterceptorFor("Compiler")(hookName))
});
Object.keys(compiler.resolverFactory.hooks).forEach(hookName => {

Angular Interview Questions

Some basic questions going from easy to difficult. A more exhaustive list of more questions from the community can be found here.

Easy

  • Whats the difference between components and directives? [ANSWER]: Components are widgets while directives more like decorators for elements and/or components.
  • How do you get a reference to a child component? [ANSWER]: ViewChild/ViewChildren or ContentChild/ContentChildren
  • What is the difference between ViewChild and ContentChild?
  • Whats the difference between NgModules and ES2015 Modules?
  • How do you lazy load components and why is lazy loading important?
  • Explain Observables and why they are useful.

Philosophy: Focusing on essentials for competitive raiding / mythic+ / pvp. alcaras#6052 on discord if you have suggestions for things to add. I'll also be updating https://subcreation.net/ for Season 2 of Mythic+ and PvP and for Sanctum of Domination by July 10th.

every week

torghast

(you'll need to work your way up to layer 12; remember once you unlock layer 12 for one wing, it's automatically unlocked for the other -- not 100% clear what layers will be unlocked each week)

  • first week: can only do layer 9 (+120 soul cinders both wings)
  • heroic week: can only do up to layer 10 (+220 soul cinders both wings)
  • mythic week: only up to layer 11 (+300 soul cinders both wings)