Skip to content

Instantly share code, notes, and snippets.

View erkobridee's full-sized avatar

Erko Bridee erkobridee

View GitHub Profile

useful tools to generate fake or do mock data

Fake Image

const LOOKUP =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
export function encodeBase64(buffer) {
const view = new Uint8Array(buffer);
let out = [];
for (let i = 0; i < view.length; i += 3) {
const [b1, b2 = 0x10000, b3 = 0x10000] = view.subarray(i, i + 3);
out.push(
b1 >> 2,
@sibelius
sibelius / asyncMentoring.md
Last active November 23, 2022 22:16
async mentoring rules

Async Mentorship

Most mentees belive that they need sync mentorship to be able to explain their problems. However, I've found that doing an async mentorship using text to provide better results. Mentorship is a long term process, you can't "fix" or "improve" someone in a session, it takes time.

image

Mentorship Cycle

The mentee will pass in the 3 steps of the mentorship cycle. The first one is to be in a given situation, or having some problem or doubt.

@adrianhajdin
adrianhajdin / TimeLine.jsx
Created June 11, 2021 13:39
Portfolio Website - JSM
import React, { useState, useRef, useEffect } from 'react';
import { CarouselButton, CarouselButtonDot, CarouselButtons, CarouselContainer, CarouselItem, CarouselItemImg, CarouselItemText, CarouselItemTitle, CarouselMobileScrollNode } from './TimeLineStyles';
import { Section, SectionDivider, SectionText, SectionTitle } from '../../styles/GlobalComponents';
import { TimeLineData } from '../../constants/constants';
const TOTAL_CAROUSEL_COUNT = TimeLineData.length;
const Timeline = () => {
const [activeItem, setActiveItem] = useState(0);
@maykbrito
maykbrito / README.md
Created February 20, 2021 13:44
Generate PDF with NodeJS and Puppeteer. Using ExpressJS, EJS and TailwindCSS to create fake data server

Generate PDF

Using NodeJS and Puppeteer.

Creating a fake data server with ExpressJS, EJS and TailwindCSS.

How to use it.

  1. Add this files do any directory
  2. Run npm install
@hail2u
hail2u / apca.js
Last active September 11, 2023 05:18
Get contrast of colors using APCA (Advanced Perceptual Contrast Algorithm)
// https://github.com/Myndex/SAPC-APCA#the-plain-english-steps-are
// Example:
// const contrast = getAPCAContrast("rgb(255, 255, 255)", "rgb(136, 136, 136)");
// This returns `66.89346308821438` (66.893%)
// SAPC-APCA README says:
// > #888 vs #fff • 66.89346308821438
// 80% means 7:1 in WCAG 2.0
// 60% means 4.5:1 in WCAG 2.0
@5t3ph
5t3ph / element-classes-and-ids-vanilla.css
Last active January 25, 2022 04:06
Tag HTML elements with their class names and IDs to visualize page structure
*[class],
*[id] {
position: relative;
outline: 2px dashed red;
}
*[class]::before, *[class]::after,
*[id]::before,
*[id]::after {
position: absolute;
@ianliu
ianliu / codigos.csv
Last active March 12, 2024 23:28
Script to fetch some Brazilian stock metadata
codigo codcvm cnpj site instituicao
PATI3 94 92.693.019/0001-89 www.panatlantica.com.br ITAU CORRETORA ACOES
PATI4 94 92.693.019/0001-89 www.panatlantica.com.br ITAU CORRETORA ACOES
BAHI3 701 45.987.245/0001-92 www.bahema.com.br ITAUBANCO - ACOES
BBDC3 906 60.746.948/0001-12 www.bradesco.com.br BRADESCO
BBDC4 906 60.746.948/0001-12 www.bradesco.com.br BRADESCO
BAZA3 922 04.902.979/0001-44 www.bancoamazonia.com.br BRADESCO
BBAS11 1023 00.000.000/0001-91 www.bb.com.br BRASIL
BBAS12 1023 00.000.000/0001-91 www.bb.com.br BRASIL
BBAS3 1023 00.000.000/0001-91 www.bb.com.br BRASIL