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
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
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
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
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
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
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
// Brain-Fried Language | |
// Load document from this GIST for a secret message | |
// https://gist.githubusercontent.com/dmsnell/b5e9465e97d352556249500c80ae6cbd/raw/bf547f71291e44c890ce9fe80c3c3b5217aae715/rot13.bf | |
{ | |
const stdin = 'Jbeq Pnzc'.split('').map( c => c.charCodeAt( 0 ) ).concat( 0 ); | |
const incDP = m => Object.assign( {}, m, { dp: m.dp + 1, maxRegister: Math.max( m.maxRegister, m.dp + 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
-,+[ Read first character and start outer character reading loop | |
-[ Skip forward if character is 0 | |
>>++++[>++++++++<-] Set up divisor (32) for division loop | |
(MEMORY LAYOUT: dividend copy remainder divisor quotient zero zero) | |
<+<-[ Set up dividend (x minus 1) and enter division loop | |
>+>+>-[>>>] Increase copy and remainder / reduce divisor / Normal case: skip forward | |
<[[>+<-]>>+>] Special case: move remainder back to divisor and increase quotient | |
<<<<<- Decrement dividend | |
] End division loop | |
]>>>[-]+ End skip loop; zero former divisor and reuse space for a flag |
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
<?php | |
/** | |
* Set the $RUNS and run `php -f benchmark-gutenberg-php-parser.php` | |
*/ | |
// I ran this file from the `Gutenberg/lib` directory | |
require_once( 'parser.php' ); | |
$RUNS = 2000; |