Skip to content

Instantly share code, notes, and snippets.

View PauloLuan's full-sized avatar
💭
Ora et labora

Paulo Luan PauloLuan

💭
Ora et labora
View GitHub Profile
@PauloLuan
PauloLuan / gist:f46a46215cc4b6a9ee030f5bdf40e524
Created February 21, 2022 11:26
github actions cron example
name: 1-minute-cron
on:
schedule:
- cron: '*/1 * * * *'
jobs:
cron:
runs-on: ubuntu-latest
steps:
- name: Call the data scrapper API route
run: |
@PauloLuan
PauloLuan / react_native_eslint.md
Created February 2, 2022 13:57
React Native ESLINT config

eslint-config-universe

Shared ESLint configs for Node, Web, and universal Expo projects.

Installation

yarn add --dev eslint-config-universe eslint prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser
@PauloLuan
PauloLuan / Ubuntu 20.04 tela trava quando aperta volume.md
Created September 24, 2021 11:23
Ubuntu 20.04 tela trava quando aperta volume

Deleting the line

modifier_map Mod3 { Scroll_Lock };

at the file:

/usr/share/X11/xkb/symbols/br

ps: only worked for me after deleting the US keyboard input and adding it again, not just switching between them.

@PauloLuan
PauloLuan / Mensis_Eucharisticus.md
Last active July 16, 2021 08:43
Mensis Eucharisticus

"Mensis Eucharisticus"

Iº DIA

Preparação

  1. Quem vem? - Cristo, Rei dos séculos, (ITm 1, 17) incorruptível que sob o manto e o fêmur traz escrito o nome: Rei dos reis e Senhor dos senhores (Ap 19, 16).

  2. A quem vem? - Ao seu súdito, que lhe deve dez mil talentos e não tem nem mesmo um trocado para começar a saldar uma dívida tão grande (Mt 18, 24-25).

  3. Por que vem? - Não para desfazer-se daquele miserável servo e tomar-lhe tudo que tem; mas para conceder-lhe o preço (cf. Cl 2, 3) do seu Corpo e do seu Sangue, um tesouro imenso, bem maior que o débito a satisfazer (cf. ICor 6, 20).

@PauloLuan
PauloLuan / git.sh
Created March 8, 2021 12:32
git copy from another branch and foda-se the branch atual
git checkout master -- myfile.js
@PauloLuan
PauloLuan / linkedin_accpet_invitations.js
Created February 24, 2021 11:46
linkedin_accpet_invitations.js
// É só acessar: https://lnkd.in/dxFRjUe
(async function(){
await document.querySelectorAll(".invitation-card__action-container .artdeco-button--secondary").forEach(c => c.click())
})();
@PauloLuan
PauloLuan / find_sort_join_markdown_files.sh
Created December 31, 2020 19:16
find_sort_join_markdown_files.sh
find . -name "*.md" -mindepth 2 -type f -print | sort | xargs cat >> teste.md
@PauloLuan
PauloLuan / git_branchs_by_date.sh
Created September 15, 2020 12:43
Gist list all branches by date
git branch -av --sort=committerdate --format='%(refname:short) - %(committerdate:short) %(authorname)' > teste.txt
@PauloLuan
PauloLuan / jest-mock-date.ts
Created August 12, 2020 07:23
jest-mock-date.ts
describe('jest mock date example', () => {
let realDateInstance = Date
beforeAll(() => {
const mockedDate = new Date('2016-12-14T02:00:00.000Z')
global.Date = class extends Date {
constructor (date) {
if (date) {
return super(date)
}
@PauloLuan
PauloLuan / macas_v1.js
Created June 7, 2020 08:03
comprar_macas_algoritmo
Processo de comprar maçãs começa
Para quitanda 0, quitanda 1 e quitanda 2, execute em sequencia:
Processo de visitar a quitanda começa
Ir à quitanda
Se a quitanda não estiver aberta, termina o "processo de visitar quitanda" atual
Se não houverem maçãs nessa quitanda, termina o "processo de visitar quitanda" atual
Se não houverem maçãs Fuji nessa quitanda, termina o "processo e visitar quitanda" atual
Se houver menos de 1 kilo de maçãs Fuji nesta quitanda, termina o "processo de visitar quitanda" atual
Se o preço das maçãs Fuji nesta quitanda for maior que 1 dólar / kilo, executar 3 vezes:
Início do processo de barganha