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
docker run --rm -d \ | |
-p 3000:3000 \ | |
-p 3001:3001 \ | |
lscr.io/linuxserver/libreoffice:latest |
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
services: | |
web: | |
image: bitnami/laravel | |
volumes: | |
- ./app:/app | |
working_dir: /app | |
environment: | |
- LARAVEL_DATABASE_HOST=db | |
- LARAVEL_DATABASE_USER=root | |
- LARAVEL_DATABASE_NAME=laravel |
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
// This is your original array: | |
const animals = ['panda', 'turtle', 'giraffe']; | |
function convertToBaby(animalsArray){ | |
// Start with an empty array. You will populate these in your loop: | |
const babyAnimals = []; | |
// Since it specifically asks for a loop: | |
for(var i = 0 ; i < animals.length ; i++){ | |
// push() basically adds something at the end of an array: | |
babyAnimals.push(`baby ${animalsArray[i]`) |
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 buildkite/puppeteer:v1.15.0 | |
RUN npm install --global --unsafe-perm pa11y-ci | |
RUN groupadd -r user && useradd -r -g user user | |
USER user | |
ENTRYPOINT ["pa11y-ci"] |
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
console.log("Hello 👋"); |
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
.parent { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} |
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 axios = require("axios") | |
const jsdom = require("jsdom") | |
const { JSDOM } = jsdom | |
async function run(){ | |
const url = "https://savvas.me/explained/promises" | |
let response = await axios.get(url) | |
let html = response.data | |
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
$("#the-button") | |
.should(doSomething) | |
.when("clicked") |
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
[ | |
"ΑΚΑΝΘΟΥ", | |
"ΑΜΜΟΧΩΣΤΟΣ", | |
"ΛΕΥΚΟΝΟΙΚΟ", | |
"ΛΥΣΗ", | |
"ΚΑΡΑΒΑΣ", | |
"ΚΕΡΥΝΕΙΑ", | |
"ΛΑΠΗΘΟΣ", | |
"ΚΥΘΡΕΑ", | |
"ΛΕΥΚΑ", |
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
// Credit: Tweet from @oliverjumpertz: https://twitter.com/oliverjumpertz/status/1460184236917460993 | |
// Filtering means: Test all elements of an array and take those with you that succeed the test | |
const filter = (array, callback) => array.reduce((accumulator, current, index, arr) => { | |
// This is the filter function. It decides which element is added to the new array | |
if (callback(current, index, arr)) { | |
// For each iteration, the current element is tested with the callback. If that test succeds | |
// it's added to the resulting array. | |
accumulator.push(current); | |
} |
NewerOlder