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 { createSelector } = require('reselect'); | |
const ids = [1,2,3]; | |
const byIds = { | |
1: { | |
name: 'one' | |
}, | |
2: { | |
name: 'two' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Strepsirrhini</title> | |
<meta name="viewport" content="user-scalable=no" /> | |
<style> | |
body { | |
margin: 0; | |
font-size: 1em; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
body { | |
margin: 0; | |
} | |
.box { | |
display: block; |
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 Tree { | |
constructor(name) { | |
this.name = name; | |
this.children = []; | |
} | |
append(item) { | |
this.children.push(item); | |
} | |
getDescendantNames() { |
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
// StackOverFlow: http://stackoverflow.com/a/30823708/1248952 | |
function getTimer(name, timeout) { | |
return () => new Promise((resolve, reject) => { | |
setTimeout(() => { | |
console.log(name); | |
resolve(); | |
}, timeout); | |
}); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<style media="screen"> | |
#container { | |
position: absolute; | |
top: 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<style media="screen"> | |
html { | |
scroll-behavior: smooth; | |
min-height: 200%; | |
} |
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
Promise.resolve(100).then(num => { | |
console.log('num: ', num); | |
return num + 100; | |
}).then(num => { | |
console.log('num2:', num); | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
console.log('timeout'); | |
resolve('World'); |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"time" | |
) | |
var ( | |
dateStart = "2016-05-02" |
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
#!/bin/bash | |
SIZES=(320 640 960 1280 1920 2560) | |
target=$1 | |
extension="${target##*.}" | |
filename="${target%.*}" | |
echo "ext is $extension" | |
if [ ! -f $target ]; then |