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 * as R from 'ramda' | |
const _handleChangeCurried = function<S, P>() { | |
return <K extends keyof S>() => { | |
return R.curry< | |
React.Component<any, S>, | |
K, | |
React.FormEvent<HTMLInputElement>, | |
void | |
>((self, key, e) => |
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 * as React from 'react' | |
import testContent from './content' | |
import { make2dContext, throttle } from './utils' | |
interface EditorState { | |
readonly font: string | |
readonly str: string | |
readonly words: ReadonlyArray<string> | |
readonly lines: ReadonlyArray<string> |
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
function createListener() { | |
console.log('creating new listener'); | |
var recognition = new webkitSpeechRecognition(); | |
recognition.continuous = true; | |
recognition.interimResults = true; | |
var res = []; | |
recognition.onresult = function(event) { | |
for (var i=0; i < event.results.length; i++) { | |
var resultList = event.results[i]; | |
if (!resultList.isFinal) { |
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
/* | |
This is an extension of the famo.us Surface type. It behaves the exact same except that the content | |
property holds a ProxyConstructor object (the type that gets returned by any of the React component | |
functions such as those in React.DOM or created by React.createClass) instead of a string or Node. | |
One thing to note is that the component fed in to content will get an extra prop, _surface, which | |
is the surface object that holds it | |
example usage | |
var TestComponent = React.createClass({ |
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> | |
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"> | |
<meta charset=utf-8 /> | |
<title>liveFyre assessment</title> | |
</head> | |
<body> | |
<canvas id="myChart" width="1200" height="400"></canvas> |
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
{\& "&", \< "<", \> ">", \" """, \' "&apos"} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* | |
Description: JS snippet to determine how many games you have in your humble bundle library | |
for a given platform. it won't filter duplicates (it does happen, but its rare) and it | |
will only count the ones in the main list(s), which appear to only be the drm free ones, | |
so those purchased via bundles that only give you steam keys, such as the humble THQ | |
bundle or the humble jumbo bundle, wont be included in the count. | |
Instructions: navigate to your main humble bundle library, select one of the platform | |
filters (eg. Windows, Mac OS X), open the browser console (in Chrome on mac the | |
shortcut is cmd-alt-j), and copy this snippit into the prompt and press |
NewerOlder