This file contains hidden or 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
// @ts-check | |
const child_process = require('child_process'); | |
/** | |
* Generates an extendable CommonJS module for composing shell commands and running them as child processes. | |
* | |
* @param {object} parentConfig | |
* @param {any[]} parentConfig.args | |
* Arguments that will be prepended to root shell command. |
This file contains hidden or 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 getQuizzes from './selectors/getQuizzes'; | |
import setQuizAnswer from './actions/setQuizAnswer'; | |
const useQuizController = () => { | |
const dispatch = useDispatch(); | |
const quizzes = useSelector(g); | |
const setQuizAnswer = useCallback((quiz, answer) => dispatch(setQuizAnswer(quiz, answer)), []); | |
return { |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<title>Rotate</title> | |
<style> | |
body { | |
background-color: #443366; | |
} | |
#thing { | |
background-color: #FF3344; |
This file contains hidden or 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, { Component } from 'react'; | |
type Day = { | |
dayText : string; | |
} | |
type Props = { } | |
type State = { | |
days : Day[] |
This file contains hidden or 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
#!/bin/bash | |
skipDownload=false | |
for arg in $@; do | |
case $arg in | |
'--skip-download') | |
skipDownload=true; | |
;; | |
esac |
This file contains hidden or 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 from 'react'; | |
import ReactDOM from 'react-dom'; | |
window.onload = () => ReactDOM.render(<App />, document.body); | |
class App extends React.Component { | |
render() { | |
const pid = 999; | |
const ProductClosure = makeProductClosure({ |
This file contains hidden or 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
type Deps = { | |
aaa : () => number, | |
bbb : (a : number, b : number) => number | |
}; | |
export default ({ aaa, bbb } : Deps) => | |
(a : number, b : number) => { | |
const x = aaa(); | |
const y = bbb(a, b); | |
return x + y; |
This file contains hidden or 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
/** | |
* Example entry point for container-less DI-based application in ES6. | |
*/ | |
// Master list of all modules used in this configuration in alphabetical order | |
import aaa_ from './aaa'; | |
import bbb_ from './bbb'; | |
import ccc_ from './ccc'; | |
import altCcc_ from './alternates/ccc'; | |
import ddd_ from './ddd'; |
This file contains hidden or 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
/** | |
* Preprocess a file's contents represented as a string. | |
* | |
* This will look for lines containing custom preprocessor directives embedded | |
* in a string. The directives take the form of psuedo-HTML tags, which begin | |
* with <@@ COND @@> and end with </@@>, where COND is any valid JavaScript | |
* expression that is used to test whether the text between the tags | |
* should be output or not. | |
* | |
* Within the COND expressions, the variable __ (double underscore) |
This file contains hidden or 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 fs from 'fs'; | |
let WindowXMLHttpRequest = null; | |
/** | |
* An XMLHttpRequest-compatible interface to Node's "fs" module. | |
*/ | |
class FSXHR { | |
constructor() { | |
/** |
NewerOlder