If you mix JS event listeners and React event listeners, you need
event.nativeEvent.stopImmediatePropagation()
/** @jsx React.DOM */ | |
"use strict"; | |
var util = { | |
// findPos() by quirksmode.org | |
// Finds the absolute position of an element on a page | |
findPos: function (obj) { | |
var curleft = 0, | |
curtop = 0; |
(function () { | |
const intervalMiliseconds = 10; | |
const waitToLoadMiliseconds = 1000; | |
const getUnsaveA = () => document.querySelector('.uiContextualLayerPositioner:not(.hidden_elem) li:last-child a'); | |
const scrollToBottom = () => window.scrollTo(0, document.body.scrollHeight); | |
const unsaveAndLoad = (recursive) => { |
import log from "ololog" | |
class Grid { | |
rows = [] | |
width = 0 | |
height = 0 | |
chars = { | |
active: ["┌", "─", "┒", "┃", "┛", "━", "┕", "│"], | |
inactive: ["┌", "─", "┐", "│", "┘", "─", "└", "│"], |
import React from "react" | |
import { render, Static, Box, Color, Text } from "ink" | |
import BigText from "ink-big-text" | |
import BBox from "ink-box" | |
import TextInput from "ink-text-input" | |
import { Tabs, Tab } from "ink-tab" | |
import _ from "lodash" | |
const purple = [102, 51, 153] | |
const hexPurple = `#663399` |
For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:
1 - Add the property classes in the AppBar component:
<AppBar classes={{root: 'my-root-class'}}
/* Using a JavaScript proxy for a super low code REST client */ | |
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
// also see https://github.com/fastify/manifetch | |
// also see https://github.com/flash-oss/allserver | |
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const createApi = (url) => { | |
return new Proxy({}, { | |
get(target, key) { |
This is definitely not the first time I've written about this topic, but I haven't written formally about it in quite awhile. So I want to revisit why I think technical-position interviewing is so poorly designed, and lay out what I think would be a better process.
I'm just one guy, with a bunch of strong opinions and a bunch of flaws. So take these suggestions with a grain of salt. I'm sure there's a lot of talented, passionate folks with other thoughts, and some are probably a lot more interesting and useful than my own.
But at the same time, I hope you'll set aside the assumptions and status quo of how interviewing is always done. Just because you were hired a certain way, and even if you liked it, doesn't mean that it's a good interview process to repeat.
If you're happy with the way technical interviewing currently works at your company, fine. Just stop, don't read any further. I'm not going to spend any effort trying to convince you otherwise.
/** | |
* On server, just register all of the resources directly to the plugin. On the client, pass in a loader file that maps bundle | |
* name to webpack bundle require (a separate entry point). Then from your action, you can call `context.loadBundle` to load | |
* the bundle resources. On the server, the resources are already available but on the client they will be lazy loaded by | |
* webpack. | |
*/ | |
'use strict'; | |
var debug = require('debug')('BundlePlugin'); | |
var PromiseLib = global.Promise || require('es6-promise').Promise; |
/* Ultra lightweight Github REST Client */ | |
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const token = 'github-token-here' | |
const githubClient = generateAPI('https://api.github.com', { | |
headers: { | |
'User-Agent': 'xyz', | |
'Authorization': `bearer ${token}` | |
} | |
}) |