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 result = (startValue => ( | |
fn => fn(fn, startValue) | |
)( | |
(fn, value) => | |
value >= 10 ? value : fn(fn, value+1) | |
))(0) | |
console.log(result) | |
const result = (startValue => { |
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 path = require('path') | |
const webpack = require('webpack') | |
const PROD = true | |
module.exports = { | |
entry: './app.js', | |
output: { | |
path: path.join(__dirname, '../public/scripts'), | |
filename: 'bundle.js', | |
}, |
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'; | |
import React from 'react'; | |
import AudioRecorder from 'react-audio-recorder'; | |
import LoginButton from './LoginButton' | |
import cookie from 'react-cookie'; | |
export default class Button extends React.Component { | |
constructor(props){ | |
super(props); | |
this.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
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
margin:0; | |
padding:0; | |
} | |
/* force scrollbar */ | |
html { overflow-y: scroll; } |
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
// SERVERN | |
// Create the http server. | |
http.createServer(function(req, res) { | |
res.writeHead(200, { | |
"Content-Type": "text/plain", | |
'Access-Control-Allow-Origin': '*' | |
}); | |
var body = ''; |
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
window.cover = { | |
Stats: { | |
exp: { | |
amount: 0 | |
}, | |
level: { | |
amount: 0 | |
}, | |
fame: { | |
amount: 0 |
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
if (Number.isInteger(parseInt(number))){ | |
var count0 = 0; | |
var countEven = 0; | |
var count = 0; | |
for (var i = 0; i < number.length; i++){ | |
if (parseInt(number[i]) % 2 === 0){ | |
if (parseInt(number[i]) === 0){ | |
count0 += 1; |