Skip to content

Instantly share code, notes, and snippets.

@gihrig
gihrig / cloudSettings
Last active December 21, 2020 19:42
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-21T19:42:49.455Z","extensionVersion":"v3.4.3"}
/* eslint-disable react/prefer-stateless-function */
class App extends React.Component {
render() {
return (
<div className={styles.wrapper}>
<A className={styles.logoWrapper} href="https://twitter.com/mxstbr">
<Img className={styles.logo} src={Banner} alt="react-boilerplate - Logo" />
</A>
{this.props.children}
<Footer />
/*
YDKJS Async and Performance ch 4:Generators "Delegating Asynchrony" pg 163
Delegating Asynchrony
Continuing the earlier multiple sequential Ajax requests
example, with yield-delegation:
This code is less than optimum as the first two requests are
called sequentially. They should be called concurrently.
@gihrig
gihrig / delay-error.js
Created June 4, 2015 14:10
Promises Ex1
/*
YDKJS Async and Performance ch 3:Promises "Chain Flow" pg 81
Generalized chain illustration, a delay-Promise creation
utility with error handling and substituted resolution message/
error recovery.
*/
'use strict';
@gihrig
gihrig / proto-10~Nicer-Syntax-code.js
Last active August 29, 2015 14:22
Bhavr Delgtn JS Ex3
'use strict';
var LoginController = {
errors: [],
getUser() {
var user = document.getElementById(
'login_username'
).value;
console.log('LoginController.getUser - user: ' + user);
return user;
@gihrig
gihrig / proto-10~Nicer-Syntax.html
Created May 28, 2015 05:23
Bhavr Delgtn html Ex3
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h3>Simpler Design</h3>
<p><b>"Nicer Syntax" Login/Auth code implemented using OLOO-style Behavior Delegation:</b></p>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h3>Simpler Design</h3>
<p><b>"Nicer Syntax" Login/Auth code implemented using OLOO-style Behavior Delegation:</b></p>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h3>Simpler Design</h3>
<p><b>"De-class-ified" Login/Auth code implemented using OLOO-style Behavior Delegation:</b></p>
<p><small>YDKJS ch 6: Login/AuthController from proto-9-Simpler-Design.js</small></p>