Add the following line to /etc/gai.conf
...
precedence ::ffff:0:0/96 100
... so that the system gives preference to IPv4, avoiding IPv6 timeout.
Add the following line to /etc/gai.conf
...
precedence ::ffff:0:0/96 100
... so that the system gives preference to IPv4, avoiding IPv6 timeout.
import React from 'react'; | |
import compose from 'recompose/compose'; | |
import classNames from 'classnames'; | |
import styles from './styles.scss'; | |
import pure from 'recompose/pure'; | |
const Timeline = ({className, children}) => { | |
const classes = classNames(className, styles.timeline); | |
return (<div className={classes}>{children}</div>); | |
}; |
# https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 | |
# https://www.digitalocean.com/community/questions/how-to-change-swap-size-on-ubuntu-14-04 | |
fallocate -l 4G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
swapon -s | |
sysctl vm.swappiness=10 | |
sysctl vm.vfs_cache_pressure=50 |
# /etc/systemd/system/couchdb.service | |
[Unit] | |
Description=Couchdb service | |
After=network.target | |
[Service] | |
Type=simple | |
User=couchdb | |
ExecStart=/opt/couchdb/bin/couchdb -o /dev/stdout -e /dev/stderr |
.container { | |
-ms-overflow-style: none; /* IE 10+ */ | |
overflow: -moz-scrollbars-none; /* Firefox */ | |
} | |
.container::-webkit-scrollbar { | |
display: none; /* Safari and Chrome */ | |
} |
git config --global alias.tags "tag --sort version:refname" |
const list = [1, 2, 3, 4, 5]; | |
const result = list.reduce((accumulator, item) => { | |
return accumulator + item; | |
}, 0); | |
console.log(result); // 15 |
const list = [ | |
{ | |
id: "772b70fa-57be-40fc-976a-1123320df94e", | |
name: "Jupiter" | |
}, | |
{ | |
id: "cced1a50-19b7-4971-aacc-a732eb5ec64c", | |
name: "Saturn" | |
}, | |
{ |
const filtered = characters.filter(character => character.debut < 1990); | |
const reduced = characters.reduce((accumulator, character) => { | |
if(character.debut < 1990) { | |
return [...accumulator, character]; | |
} | |
return accumulator; | |
}, []); |
const mapped = characters.map(character => character.name); | |
const reduced = characters.reduce((accumulator, character) => [...accumulator, character.name], []); | |
// [ | |
// "Donkey Kong", | |
// "Captain Falcon", | |
// "Fox", | |
// "Kirby", | |
// "Link" |