Skip to content

Instantly share code, notes, and snippets.

View tuliocll's full-sized avatar
🎶
eu vim da roça meu bem

Tulio Calil tuliocll

🎶
eu vim da roça meu bem
View GitHub Profile
@tuliocll
tuliocll / mac1-aws-ec2-resize-disk.md
Last active June 12, 2021 20:40
Resize Mac1 AWS EC2 disk

First, list all disks:

diskutil list

Check the avaliable space and the identifier for the Container partition, to me is the disk1s2 identifier on /dev/disk1 disk.

Repair the disk:

diskutil repairdisk /dev/disk1
@vmarcosp
vmarcosp / links-live-rescriptbr.md
Last active November 25, 2022 16:22
Links de todas as referências, redes sociais e sites utilizados nas lives de ReScript
@adolfont
adolfont / ada_lovelace_day_br.md
Last active October 15, 2020 12:33
Ada Lovelace Day events in Brazil

Eventos em homenagem ao Ada Lovelace Day 2020 no Brasil

20/10/2020

Meninas Digitais no Cerraddo

  • Período Matutino (9h-11h)
  • Período Noturno (19h-22h)

Mais informações e link de inscrição em: http://meninasdigitaisnocerrado.com.br/adl/

@tuliocll
tuliocll / docker-php-vscode.md
Last active July 27, 2023 22:25
script to create a php executable file from container to your machine, then you can setup the PHP › Validate: Executable Path on vscode.

Starting

  • create a file on /usr/local/bin with name 'php';
nano /usr/local/bin/php
  • paste de following code:
#!/bin/bash
docker exec -i --user=1000:1000 YOUR-CONTAINER-NAME php "$@"
@tuliocll
tuliocll / localizationBR.js
Last active July 28, 2021 21:33
Arquivo de tradução para o [material table](https://www.npmjs.com/package/material-table) para português BR.
const localizationBR = {
pagination: {
labelDisplayedRows: '{from}-{to} de {count}',
labelRowsSelect: 'linhas',
labelRowsPerPage: 'Linhas por página:',
firstTooltip: 'Primeira página',
firstAriaLabel: 'Primeira página',
previousAriaLabel: 'Página anterior',
previousTooltip: 'Página anterior',
nextAriaLabel: 'Próxima página',
@wendelnascimento
wendelnascimento / apolloConfig.js
Created November 25, 2019 21:17
apolloConfig
import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { createUploadLink } from 'apollo-upload-client';
import { onError } from 'apollo-link-error';
import { ApolloLink } from 'apollo-link';
const client = new ApolloClient({
link: ApolloLink.from([
onError(({ graphQLErrors, networkError }) => {
if (graphQLErrors)
@max10rogerio
max10rogerio / yup.locale.pt-br.js
Last active May 10, 2024 17:02
Translation of the main messages from the Yup library into the Pt-Br language.
/* eslint-disable */
// For more infos, see: https://github.com/jquense/yup/blob/master/src/locale.js
import { setLocale } from 'yup'
const translation = {
mixed: {
default: '${path} é inválido',
required: '${path} é um campo obrigatório',
oneOf: '${path} deve ser um dos seguintes valores: ${values}',
notOneOf: '${path} não pode ser um dos seguintes valores: ${values}',
@martsie
martsie / package.json
Last active February 5, 2022 20:50
Purge CSS in Create React App without ejecting
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1"
},
"devDependencies": {
@gaearon
gaearon / uselayouteffect-ssr.md
Last active May 16, 2024 14:13
useLayoutEffect and server rendering

If you use server rendering, keep in mind that neither useLayoutEffect nor useEffect can run until the JavaScript is downloaded.

You might see a warning if you try to useLayoutEffect on the server. Here's two common ways to fix it.

Option 1: Convert to useEffect

If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect instead.

function MyComponent() {
@ywwwtseng
ywwwtseng / host-react-app-on-apache-server.md
Last active May 3, 2024 15:52
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production