Most directly from or inspired by Understanding ES6 and Esploring ES6. So big thanks to Nicholas Zakas and Axel Rauschmayer
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
FROM yourdockername/base-php-nginx:latest AS build | |
# BUILD STAGE | |
# the primary reason we have two build stages is so SSH key of private repo's will never | |
# be in final image | |
# COPY IN BUILD SSH KEY | |
# It won't be copied to final image | |
# add this build arg to compose file | |
ARG BUILDKEY | |
RUN if [ -z "$BUILDKEY" ]; then echo "BUILDKEY SSH NOT SET - ERROR"; exit 1; else : ; fi |
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
#EXTM3U | |
#EXTINF:0 tvg-name="Newsmax TV" tvg-language="English" tvg-country="CA" tvg-id="Newsmax-TV" tvg-logo="https://i.imgur.com/Twkovic.gif" group-title="Entertainment",Newsmax TV | |
https://nmxlive.akamaized.net/hls/live/529965/Live_1/index.m3u8 | |
#EXTINF:0 tvg-logo="https://i.imgur.com/ODIWC6n.jpg" tvg-name="Infowars1" tvg-id="Infowars1" group-title="News",Infowars Live1 | |
https://infostream.secure.footprint.net/hls-live/infostream-infostream/_definst_/master.m3u8 | |
#EXTINF:0 tvg-logo="https://i.imgur.com/ODIWC6n.jpg" tvg-name="Infowars" tvg-id="Infowars" group-title="News",Infowars Live 2 | |
https://infowarslive-lh.akamaihd.net/i/infowarsevent_1@366809/master.m3u8 | |
#EXTINF:0 tvg-name="Russia today News" tvg-country="RU" tvg-language="English" tvg-logo="https://i.imgur.com/QY4B8Hg.png" group-title="News",RT News | |
https://rt-news-gd.secure2.footprint.net/1103.m3u8 | |
#EXTINF:0 tvg-name="Russia today USA" tvg-country="RU" tvg-language="English" tvg-logo="https://i.imgur.com/QY4B8Hg.png" group-title="News",RT USA |
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
export default [ | |
{ id: 'AF', | |
name: 'Afghanistan', | |
continent: 'Asia', | |
currencyId: 'AFN', | |
phoneCode: '93', | |
flag: '🇦🇫' }, | |
{ id: 'AX', | |
name: 'Åland Islands', | |
continent: 'Europe', |
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 _ = require('lodash'); | |
const str = '1dé@#j. à$42^ù`=:/+%M£¨-)àç!Їжакè§("^é& vu'; | |
// exclude all special characters and spaces in a string | |
const result = _.deburr(str).replace(/\W/g, ''); | |
// result = 1deja42uMaceevu | |
// exclude all special characters and replaces spaces by underscore in a string | |
// N spaces side by side = 1 underscore | |
const result = _.deburr(str).replace(/[^\w\s]/g, '').trim().replace(/\s+/g, '_'); |
leaflet+riot
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 next = (iter, callback, prev = undefined) => { | |
// 2. The yielded value is extracted by calling | |
// .next(). We pass the previous value back into | |
// the generator for assignment. | |
const item = iter.next(prev); | |
const value = item.value; | |
// 4. The final value gets passed to the callback. | |
if (item.done) return callback(prev); |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
function *doStuff(){ | |
yield 1; | |
yield 2; | |
yield *doStuff(); | |
} | |
var it = doStuff(); | |
var res; | |
res = it.next(); |