View entry.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
{ | |
heating: [ | |
{ | |
cost: 4.11, | |
date: 'Di.' | |
}, | |
{ | |
cost: 4.11, | |
date: 'Mi.' | |
}, |
View genesis_public_key
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
04ea31fa598b02dcad3fff9b55f7bbae770728a192332fddb5e22e77bfac37cf73c767a571926b42588715d45c13dde1e27b79c5e0dca9c802d1709f718bcdd430;rabc |
View remove.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
import { | |
compose, | |
findIndex, | |
pullAt, | |
curry, | |
} from 'lodash/fp'; | |
const MY_LIST = [/* items here */]; | |
const removeFromList = curry((itemToRemove, list) => compose( |
View find2.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
import { | |
compose, | |
findIndex, | |
cond, | |
} from 'lodash/fp'; | |
const MY_LIST = [/* items here */]; | |
const findMyItemIndex = findIndex(item => item === 'MY_ITEM'); | |
const changeItemToSomething = () => // returns NEW object (immutable) |
View find.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
import { | |
compose, | |
findIndex, | |
cond, | |
} from 'lodash/fp'; | |
const MY_LIST = [/* items here */]; | |
const findMyItemIndex = findIndex(item => item === 'MY_ITEM'); | |
const changeItemToSomething = () => // returns NEW object (immutable) |
View methods.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
class A { | |
constructor(){ | |
this.method3 = this.method3.bind(this); | |
} | |
method1() { | |
} | |
method2 = () => { | |
} |
View gist:51e2aee90acb457ea0adc548c3df8dae
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
------------------ | |
System Information | |
------------------ | |
Serial Number: 9S7179111077ZF5000145 | |
Product Name: GE72 2QF | |
OS: Microsoft Windows 10 Home 64-bit | |
Windows Product Key: 8HVX7 | |
HDI Build: non-OEM | |
BIOS Version: E1791IMS.113 | |
BIOS Release Date: 2016/04/19 |
View gist:d9d5fa251d397f5d9e5ee3513e9947fa
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
> require.extensions['.svg'] = () => 1; | |
[Function] | |
> var bla = require('../icons/icon-close.svg') | |
undefined | |
> bla | |
{} |
View bench.txt
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
$python parallel.py | |
[13:48:59:130701] Doing GET request to http://google.com | |
[13:48:59:134958] Doing GET request to http://facebook.com | |
[13:48:59:135498] Doing GET request to http://twitter.com | |
[13:48:59:136174] Doing GET request to http://slack.com | |
****** STATUSES: [{'status': 200, 'url': 'http://google.com'}, {'status': 200, 'url': 'http://twitter.com'}, {'status': 200, 'url': 'http://slack.com'}, {'status': 200, 'url': 'http://facebook.com'}] | |
$python sequential.py | |
[13:49:04:078752] Doing GET request to http://google.com | |
[13:49:04:232725] Doing GET request to http://facebook.com |
View form.jsx
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
<form | |
onSubmit={handleSubmit(values => ( | |
new Promise((resolve, reject) => { | |
// errorsForm returns an Object where keys are fields with errors and values are messages to show in form. | |
const errors = this.errorsForm(values); | |
if (! isEmpty(errors)) { | |
return reject(errors); | |
} |
NewerOlder