Skip to content

Instantly share code, notes, and snippets.

View tgmarinho's full-sized avatar
💻
read my blog: tgmarinho.com

Thiago Marinho tgmarinho

💻
read my blog: tgmarinho.com
View GitHub Profile
@tgmarinho
tgmarinho / import-send.csv
Created July 18, 2024 21:58
import-lgnd-csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
const fs = require('fs');
const csv = require('csv-parser');
const { PrismaClient } = require('@prisma/client');
const moment = require('moment');
const prisma = new PrismaClient();
async function importCSV(filePath) {
const pessoas = [];
@tgmarinho
tgmarinho / TERMOS.ts
Created July 7, 2024 14:35
Termos LGND
import { topInfos } from "lib/constants";
export default [
{
title: `I – TERMO DE DECLARAÇÃO`,
info: [
`Através do presente TERMO, o PARTICIPANTE declara e atesta, EXPRESSAMENTE, que sua participação no evento denominado TOP (Track Outdoor Potencial – LEGENDÁRIOS) se dá de livre e espontânea vontade, concordando em participar e arcar com os custos correspondentes a esta participação, declarando ainda, estar assumindo por conta própria os riscos inerentes às atividades a serem desenvolvidas no evento, entendendo que as mesmas possuem natureza educativa, e não comercial. Ainda que essas atividades possam se tornar exaustivas, se tratando de atividades diretamente na natureza como trilhas, caminhadas, incursões em rios ou cavernas, alpinismo com uso de equipamentos de mobilização suspensos no ar (sempre com comando de um Supervisor Legendário), dentre outras.`,
`2 – Ainda através da assinatura do presente instrumento, o PARTICIPANTE declara e atesta ter sido totalmente informado (
@tgmarinho
tgmarinho / agile-questions.md
Created June 27, 2024 17:09 — forked from sibelius/agile-questions.md
agile-questions
  • do you use feature flags? expand
  • do you use git flow?
  • have you decoupled deploy from release? https://www.honeycomb.io/blog/deploys-wrong-way-change-user-experience
  • do you use sprints?
  • do you have automated tests?
  • do you do refactoring?
  • do you use types (typescript)?
  • how do you manage the project?
  • do you have daily meetings? expand
  • do you have written documentation?
@tgmarinho
tgmarinho / main.md
Created May 10, 2024 14:00
Workflow Development Feature Flag, Tag Releases

VIVA LA MAIN

The proposal is to maintain only one branch: main.

Dev opens a PR, and CI runs tests, checks if the build passes, code review is done, and the merge is made to main.

All new code on main will generate a new CI and CD, a release for the staging environment, where QA is performed by stakeholders (Dev, QA, Product).

Control of what can be displayed by environment is done through feature flags, basically an if statement in the code that checks if the feature can be activated or deactivated in environment X (staging | production).

@tgmarinho
tgmarinho / cc.md
Created April 19, 2024 20:48 — forked from noghartt/cc.md
Resources to learn more about Computer Science and related stuffs

VIVA LA MAIN

A proposta é manter apenas uma branch: main.

Dev abre PR, e o CI roda testes, verifica se build passa, é feito code review e o merge é feito para main.

Todo código novo na main vai gerar uma nova CI e CD, uma release para ambiente de staging, onde é feito o QA pelas partes interessadas (Dev, QA, Product).

O controle do que pode ser exibido por ambiente é feito por feature flags, basicamente um if no código que verifica se no ambiente X (staging | production) a feature pode ser ativada ou desativada.

@tgmarinho
tgmarinho / production-api-and-cronjobs.yml
Created April 10, 2024 13:56
main branch - .github/actions
name: Deploy COMPANY API & Cronjobs API Production
concurrency:
group: production-api-${{ github.ref }}
on:
push:
branches:
- main
@tgmarinho
tgmarinho / .tsx
Created February 16, 2024 17:44 — forked from dutradotdev/.tsx
BlurContainer in React Native
import React from 'react';
import WebView from 'react-native-webview';
export type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
export interface BlurContainerProps {
backgroundColor: RGBA;
blurRadius: number;
}
"use client";
import 'core-js/stable';
import { motion } from "framer-motion";
import { CalendarDays, CheckIcon, CreditCard, MapPin } from "lucide-react";
import Link from "next/link";
import Button from "../Button";
import React from "react";
import QRCode from "qrcode.react";
import { useOpenPix } from '@openpix/react';
@tgmarinho
tgmarinho / adjascent_state.js
Last active September 16, 2023 00:39
adjascent_state.js
const estados = [
{ name: 'Alabama', abbreviation: 'AL', id: 1 },
{ name: 'Alaska', abbreviation: 'AK', id: 2 },
{ name: 'American Samoa', abbreviation: 'AS', id: 3 },
{ name: 'Arizona', abbreviation: 'AZ', id: 4 },
{ name: 'Arkansas', abbreviation: 'AR', id: 5 },
{ name: 'California', abbreviation: 'CA', id: 6 },
{ name: 'Colorado', abbreviation: 'CO', id: 7 },
{ name: 'Connecticut', abbreviation: 'CT', id: 8 },
{ name: 'Delaware', abbreviation: 'DE', id: 9 },