Skip to content

Instantly share code, notes, and snippets.

View Lucasdsk's full-sized avatar
🏠
Working remotely

Lucas Gomes Lucasdsk

🏠
Working remotely
View GitHub Profile
@Lucasdsk
Lucasdsk / button-loader.json
Created July 25, 2023 14:51
Button Loader
{"v":"5.9.0","fr":30,"ip":0,"op":30,"w":28,"h":28,"nm":"loader","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"loader","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[14,14,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[24,24],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.070588238537,0.070588238537,0.070588238537,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 9231","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group"
FROM node:18.15.0-alpine3.17 as builder
ARG VITE_FIREBASE_WEB_APP_API_KEY
ARG VITE_FIREBASE_PROJECT_ID
ARG VITE_ATHENAHEALTH_BASE_URL
ARG VITE_ATHENAHEALTH_PRACTICE_ID
# Install Required packages.
RUN apk --no-cache add curl python3 bash git ca-certificates \
&& addgroup -S app && adduser -S -g app app
@Lucasdsk
Lucasdsk / TestAsyncTimeout.js
Created January 19, 2022 01:30
Testing a delayed setTimeout using Promise
const timeoutWithAwait = async () =>
await setTimeout(() => {
console.log("[timeoutWithAwait] - timed out");
}, 500);
const timeoutWithPromise = () =>
new Promise((resolve) =>
setTimeout(() => {
console.log("[timeoutWithPromise] - timed out");
resolve();
@Lucasdsk
Lucasdsk / HTTP to HTTPS redirect with NextJs Heroku.md
Created May 5, 2021 22:40
HTTP to HTTPS redirect with NextJs Heroku

To configure an HTTP -> HTTPS redirect using NextJs on Heroku, is necessary to configure a NextJs custom server.

Here is a custom server configured with the redirect working:

server.js

const express = require('express');
const cookieParser = require("cookie-parser");
const next = require('next');
@Lucasdsk
Lucasdsk / machine.js
Last active June 5, 2020 17:40
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Lucasdsk
Lucasdsk / machine.js
Last active May 29, 2020 17:54
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Lucasdsk
Lucasdsk / story.code-snippets.json
Created March 24, 2020 14:06
Snippet to create Storybook stories
{
"Create a story": {
"scope": "javascript, typescript",
"prefix": "story",
"body": [
"import React from 'react'",
"import ${TM_FILENAME_BASE/(.*)\\..+$/$1/} from '.'",
"",
"export default {",
"\ttitle: '${2:My Story}',",