🚧 Still in progress
- Javascript/NodeJs/TypeScript
- PostgreSQL
#!/bin/bash | |
if ! [ -x "$(command -v docker-compose)" ]; then | |
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-\$(uname -s)-\$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose | |
fi | |
docker-compose --version |
#!/bin/bash | |
SERVICES_LIST=(http://localhost:3001/healthcheck http://localhost:3000/healthcheck) | |
isServiceReady(){ | |
ping=$(curl -s -f -LI $1) | |
if [ -z "$ping" ]; then | |
false; | |
else | |
true; |
/* | |
* Fetch users groups through an impersonated Service Account | |
*/ | |
const { google } = require('googleapis'); | |
const credentials = require('../service-account-credentials.json') | |
const scopes = [ | |
'https://www.googleapis.com/auth/admin.directory.user.readonly', | |
'https://www.googleapis.com/auth/admin.directory.group.readonly', | |
] |
# Multi-stage | |
# 1) Node image for building frontend assets | |
# 2) nginx stage to serve frontend assets | |
# Name the node stage "builder" | |
FROM node:10 AS builder | |
# Set working directory | |
WORKDIR /app | |
# Copy all files from current directory to working dir in image | |
COPY . . |
<img src="image.png" loading="lazy" alt="…" width="200" height="200"/> |
<!-- | |
The browser uses the first listed source that's in | |
a format it supports. If the browser does not support | |
any of the formats listed in the <source> tags, it | |
falls back to loading the image specified by the <img> tag. | |
--> | |
<picture> | |
<source type="image/webp" srcset="green-environment.webp"> | |
<source type="image/jpeg" srcset="green-environment.jpg"> | |
<img src="green-environment.jpg" alt=""> |
<video autoplay loop muted playsinline> | |
<source src="/saving-energy.webm" type="video/webm"> | |
<source src="/saving-energy.mp4" type="video/mp4"> | |
</video> |
const transpose = a => a[0].map((_, c) => a.map(r => r[c])); |
// ES6 | |
const clickHandler = (parameter) => (event) => { | |
// Do something | |
alert('Here is your parameter:', parameter); | |
}; | |
// ----- | |
// Standard JS |