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
module Main where | |
import Prelude | |
import Data.Foldable (fold) | |
import Data.Generic | |
import Data.Maybe | |
import TryPureScript | |
data CommentId = CommentId Int | |
type DateTime = String {- this interactive editor doesn't have the right type -} |
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
const height = ( state = 8, { type, height } ) => | |
'SET_HEIGHT' === type || 'RESET_BOARD' === type | |
? height | |
: state; | |
const width = ( state = 8, { type, width } ) => | |
'SET_WIDTH' === type || 'RESET_BOARD' === type | |
? width | |
: state; |
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
version: '2' | |
services: | |
wordpress: | |
image: wordpress | |
ports: | |
- 80:80 | |
environment: | |
WORDPRESS_DB_PASSWORD: example |
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
SCREEN 12 | |
CLS | |
RANDOMIZE TIMER | |
maxx = 640 | |
maxy = 480 | |
x1% = INT(RND * maxx) + 1 | |
y1% = INT(RND * maxy) + 1 | |
TYPE VERTEX | |
XC AS DOUBLE |
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
const childProcess = require( 'child_process' ) | |
const fs = require( 'fs' ) | |
const spawn = childProcess.spawn | |
const spawnSync = childProcess.spawnSync | |
const l = m => { console.log( m ); return m } | |
const needsDir = dir => ! fs.existsSync( dir ) && fs.mkdirSync( dir ) |
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
version: '2' | |
services: | |
wordpress: | |
image: wordpress | |
ports: | |
- 80:80 | |
environment: | |
WORDPRESS_DB_PASSWORD: example | |
volumes: |
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 { | |
newTracksEvent | |
} from 'analytics/actions' | |
export const Doohickey = ( { recordClick, hotness } ) => | |
<div onClick={ recordClick( 'dingos', { hotness } ) }>Dingos!</div> | |
const mapDispatchToProps = dispatch => ( { | |
recordClick: compose( dispatch, newTracksEvent ) | |
} ) |
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
const { Router, | |
Route, | |
IndexRoute, | |
Redirect, | |
Link, | |
IndexLink | |
} = ReactRouter | |
const Wrapper = React.createClass( { | |
render() { |
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
'use strict' | |
const l = m => console.log( m ) | |
const s = m => l( attempt( () => JSON.stringify( m ) ) ) | |
const attempt = f => { try { return f() } catch (e) { return null } } | |
const wpcom = (() => { | |
const extender = a => Object.assign( {}, a, { extend: extend( a ) } ) | |
const reducer = base => ( prev, builder ) => | |
extender( Object.assign( {}, prev, builder( base ), { version: base.version + 1 } ) ) |
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
"use strict" | |
const message = `The quick brown fox jumped over the lazy dog. What a jerk!`; | |
const intervals = [ | |
[ 25, 32, 'strong' ], | |
[ 5, 9, 'a' ], | |
[ 26, 29, 'span' ], | |
[ 0, 0, 'img' ], | |
[ 32, 37, 'em' ], |