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
<?xml version="1.0" encoding="UTF-8"?> | |
<vxml version = "2.1" > | |
<form> | |
<record name="recording" beep="true" dtmfterm="true" maxtime="100s"> | |
<prompt> | |
Please start your recording at the sound of the beep. | |
</prompt> | |
<prompt> | |
After you are finished, you may press any DTMF key to indicate that you are done recording. | |
</prompt> |
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, { Component } from 'react' | |
import {operations, chan, go, take, CLOSED} from 'js-csp' | |
const {mult} = operations | |
export default function polyfillObserve(ComposedComponent, observe) { | |
observe = observe || ComposedComponent.observe | |
if(!observe){ |
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 {go, chan, put, take, buffers, putAsync, CLOSED} from 'js-csp' | |
const BUFFER_LIMIT = 100 | |
const NUM_OF_WORKERS = 4 | |
var inputChannel = csp.chan(buffers.dropping(BUFFER_LIMIT)) | |
function fakeDataGenerator(){ | |
putAsync(Math.random()) | |
setTimeout(fakeDataGenerator, Math.random() * 2000) |
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 component(fn){ | |
class C extends React.Component { | |
render(){ | |
return fn(this.props, this.context) | |
} | |
} | |
C.displayName = fn.displayName || fn.name | |
C.propTypes = fn.propTypes | |
C.contextTypes = fn.contextTypes | |
return C |
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 VerEx from 'verbal-expressions'; | |
const eventualCallIs = name => { | |
// FOR PERF | |
const boundCheck = node => | |
node.type === 'Identifier' && node.name === name || | |
node.type === 'MemberExpression' && boundCheck(node.object) || | |
node.type === 'CallExpression' && boundCheck(node.callee) | |
return boundCheck; |
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
#!/usr/bin/env bash | |
# install Xcode Command Line Tools | |
# https://github.com/timsutton/osx-vm-templates/blob/ce8df8a7468faa7c5312444ece1b977c1b2f77a4/scripts/xcode-cli-tools.sh | |
# touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress; | |
# PROD=$(softwareupdate -l | | |
# grep "\*.*Command Line" | | |
# head -n 1 | awk -F"*" '{print $2}' | | |
# sed -e 's/^ *//' | | |
# tr -d '\n') |
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
# PREREQUISITES: | |
# install docker | |
# git clone antigen into your home folder. Should be able to find $HOME/antigen.zsh | |
# install rvm | |
# git clone zsh-autosuggestions into ~/.zsh/ | |
# so `source ~/.zsh/zsh-autosuggestions/autosuggestions.zsh` works. | |
# Switch terminal to zsh instead of bash | |
export BROWSER_SYNC_HOSTNAME=<USERNAMEHERE>.dev.agkn.net | |
export GOPATH=$HOME/go-packages/ |
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
/* @flow */ | |
type $Function1<A, B> = (arg: A) => B; | |
type _Function1Value<A, B, F: $Function1<A, B>> = B; // eslint-disable-line | |
type $Function1Value<F: $Function1<*, *>, A> = _Function1Value<A, *, F>; | |
var toString = (value) => String(value) | |
var toNumber = (value) => parseFloat(value) || 0 | |
type NumberXString = ((value: number) => string) & ((value: string) => number) |
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
/* eslint-disable */ | |
// @flow | |
type $ObjectPair<K, V> = {[key: K]: V} | Object | |
type _$Value<Key: string, V, O: $ObjectPair<Key, V>> = V | |
type $Value<O: Object, K: $Keys<O>> = _$Value<K, *, O> | |
type Obj = { | |
c: number, | |
b: boolean, |
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
/* @flow */ | |
type _NonNull<T, N: ?T> = T | |
type $NonNull<N> = _NonNull<*, N> | |
type Num = $NonNull<?number> | |
;(45: Num) | |
// $ExpectError | |
;(undefined: Num) |
OlderNewer