- learn why we need docker
- learn how to define a Dockerfile
- learn how to build a docker
- learn how to list images
- learn how to run docker with port forward
- learn how to go inside docker to debug, running /bin/bash
- learn docker compose
- learn how to send a docker image to a reqistry (dockerhub or aws ecr)
- learn how to deploy a docker to kubernetes, aws ecs or another platform
- learn how to use docker volumes
/* | |
dado o seguinte cenário, um objeto que pode ter valores aninhados até 2 níveis, | |
deve-se remover a chave do primeiro nível se alguma das chaves aninhadas | |
for (undefined ou {} ou '' ou null) - 0 não conta | |
*/ | |
const isObject = (v) => typeof v === 'object' && !Array.isArray(v) | |
const isEmptyObject = (obj) => isObject(obj) && (Object.keys(obj).length === 0) | |
const isNull = (v) => v === '' || v === null || v === undefined; |
const Background = () => { | |
const { viewport } = useThree() | |
const scale = useMemo(() => ((40 + 15) / viewport.distance), [viewport]) | |
const [bgTexture] = useTexture(['./bg.png']) | |
const shaderArgs = useMemo(() => ({ | |
uniforms: { | |
uTexture: { value: bgTexture }, | |
uResolution: { value: { x: viewport.width, y: viewport.height } }, | |
uImageRegsolution: { value: { x: bgTexture.image.width, y: bgTexture.image.height } }, |
export const apiWithLog = (init, options) => { | |
const end = timeSpan(); | |
return fetch(init, options).then(async (response) => { | |
const durationTime = end(); | |
const text = await response.text(); | |
let json; | |
try { |
FROM node:12.20.1 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
ENV GRAPHQL_PORT=5001 | |
EXPOSE ${GRAPHQL_PORT} | |
COPY ./build/graphql.js /usr/src/app/ |
- learn how to bundle backend using webpack in a single bundle (check this https://gist.github.com/jgcmarins/2860f547f5d785dce24ca0eadbe3abdd)
- learn how to automate lamdba deploys using serveless or aws cdk (github actions)
- learn how to configure and automate api gateway
- learn how to automate tests lambdas using jest
- learn how to configure, automate and use RDS Proxy to fast database workflow in lamdbas (also cache database connections)
- how the performance gain using RDS Proxy over normal database usage
- learn about cold start and lambda statefull (https://www.swyx.io/stateful-serverless/)
- expose a CRUD api in lamdba
- put everything on open source (github)
- write a blog post about each of the topics above
It's a port of Sooth Scroller for Svelte for React.
Actually, it requires GSAP, TypeScript & Tailwindcss are optional.
To remove TypeScript, just remove the type marks. To remove Tailwindcss, remove tailwindclasses but don't forget to reproduce the same styles in the elements with pure CSS.
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple
) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic
module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Older Keychron keyboards (those not based on QMK) use the hid_apple
driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.
sudo apt-get update | |
echo 'installing curl' | |
sudo apt install curl -y | |
echo 'installing git' | |
sudo apt-get install git -y | |
echo "What name do you want to use in GIT user.name?" | |
read git_config_user_name |
const Discord = require('discord.js') | |
// your bot token | |
const token = 'NzM4MDk2NjA4NDQwNDgzODcw.XyG8CA.RbwIBFnAbrRDYOlTdLYgG_T4CMk' | |
const discordUsername = 'example#1234' | |
const roleToAdd = 'Cool Person' | |
const guildName = 'Your Guild Name' | |
function deferred() { | |
let resolve, reject |