Skip to content

Instantly share code, notes, and snippets.

View joshwiens's full-sized avatar

Joshua Wiens joshwiens

View GitHub Profile

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)

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.
@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 => {
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 => {
@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';
/* this plugin fixes missing asset caching support in extract-text-webpack-plugin, preventing unnecessary rebuilds */
const { CachedSource, ConcatSource } = require('webpack-sources');
const loaderUtils = require('loader-utils');
module.exports = class {
apply(compiler) {
compiler.plugin("compilation", function (compilation) {
compilation.plugin("optimize-assets", function (assets, callback) {
if (!assets) {
@colophonemes
colophonemes / create_triggers
Last active February 17, 2024 15:15
Postgres TRIGGER to call NOTIFY with a JSON payload
CREATE TRIGGER person_notify AFTER INSERT OR UPDATE OR DELETE ON income
FOR EACH ROW EXECUTE PROCEDURE notify_trigger(
'id',
'email',
'username'
);
CREATE TRIGGER income_notify AFTER INSERT OR UPDATE OR DELETE ON income
FOR EACH ROW EXECUTE PROCEDURE notify_trigger(
'id',
@gerhardberger
gerhardberger / .hyperterm.js
Created July 15, 2016 19:48
tomorrow night eighties colors for hyperterm
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 13,
// font family with optional fallbacks
fontFamily: '"Droid Sans Mono", Menlo, monospace',
// terminal cursor background color (hex)
cursorColor: '#cccccc',
@btroncone
btroncone / ngrxintro.md
Last active June 26, 2024 08:27
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@mraible
mraible / mock.search.service.ts
Created March 16, 2016 05:18
Correct Search Service
import {provide} from 'angular2/core';
import {SpyObject} from 'angular2/testing_internal';
import {SearchService} from '../search.service';
export class MockSearchService extends SpyObject {
getAllSpy;
getByIdSpy;
searchSpy;
saveSpy;