These are the Glossier Engineering and Data role definitions for both teams.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function workerFunction() { | |
this.addEventListener('message', (e) => { | |
console.log('log2: ', e); | |
fetchUrl(e.data); | |
}) | |
const fetchUrl = (url) => { | |
fetch(url) | |
.then((response) => { | |
console.log(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); | |
// creates the server | |
var server = net.createServer(); | |
//emitted when server closes ...not emitted until all connections closes. | |
server.on('close',function(){ | |
console.log('Server closed !'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Suspense, useState } from "react"; | |
import { unstable_createResource as createResource } from "react-cache"; | |
import { | |
Combobox, | |
ComboboxInput, | |
ComboboxList, | |
ComboboxOption | |
} from "./Combobox2.js"; | |
function App({ tabIndex, navigate }) { |
These are the Kickstarter Engineering and Data role definitions for both teams.
Implement a queue using async/await.
I created a single instance, easy enough to convert to a factory if you want multiple queues or add features like timeout with configuration object.
Although this solution is simple and does not require any additional libraries I do not think it is robust. For example retries after errors or timeouts is not supported. Rather than solve these issues it makes more sense to look at proven solutions such as message/task queues.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adds a lovely fade in of the modal | |
// and a gentle slide-down of the modal content | |
class Demo extends React.Component { | |
state = { showDialog: false }; | |
render() { | |
return ( | |
<div> | |
<button onClick={() => this.setState({ showDialog: true })}> | |
Show Dialog | |
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Google Material Design 1-24dp elevations (shadows) | |
// https://github.com/material-components/material-components-web/blob/master/packages/mdc-elevation/_variables.scss | |
const umbraOpacity = '0.2'; | |
const penumbraOpacity = '0.14'; | |
const ambientOpacity = '0.12'; | |
// map index are [0-24] | |
const elevationUmbraMap = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only entry point for CSS processed via webpack | |
import '../styles/main.scss'; | |
import React from 'react'; | |
import { render } from 'react-dom'; | |
import { browserHistory } from 'react-router'; | |
import configureStore from './store'; | |
import root, { Root } from './root'; | |
const store = configureStore(root.rootInitialState); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="readFromAmazonS3"> | |
<cfargument name="fileName" required="true"/> | |
<cfargument name="bucket" default="mybucket"/> | |
<cfhttp method="GET" url="http://s3.amazonaws.com/#arguments.bucket#/#arguments.fileName#" timeout="300" result="result"></cfhttp> | |
<cfreturn result.filecontent/> | |
</cffunction> |
NewerOlder