Skip to content

Instantly share code, notes, and snippets.

View fmoliveira's full-sized avatar

Filipe Oliveira fmoliveira

  • Level Access
  • Toronto
  • 04:03 (UTC -04:00)
View GitHub Profile
@fmoliveira
fmoliveira / README.md
Created October 2, 2021 03:50
Learning chakra ui
@fmoliveira
fmoliveira / README.md
Last active May 1, 2021 01:28
Better Gmail - User Styles

Better Gmail - User Styles

Turns a boring whitey email table into a beautiful and comfortable translucent table. Works better with a beautiful wallpaper and some blur.

Features:

  • Slightly reduces the opacity of email rows and header
  • Adds a subtle border between email rows for extra reading comfort
  • Change labels colours to be more eye-catching

Disclaimer: this screws up the background on gmail settings, but since I almost never use it, I didn't feel into investing time to make that better.

@fmoliveira
fmoliveira / github_gpg_key.md
Created March 29, 2021 20:01 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@fmoliveira
fmoliveira / README.md
Created November 27, 2020 07:29
eslint nuisances

How to circumvent eslint nuisances

no-param-reassign with immerjs

Ignore it for a specific parameter name: "no-param-reassign": ["error", { "props": true, "ignorePropertyModificationsFor": ["draft"] }],

Source: immerjs/immer#189 (comment)

@fmoliveira
fmoliveira / Simulating file upload.js
Created September 16, 2020 16:13
React Testing Library - Tips & Tricks
// Credits to Kent C. Dodds
// Source: https://github.com/testing-library/react-testing-library/issues/93#issuecomment-392126991
test('can select an image and upload will make a request to upload it', async () => {
const { container, getByLabelText, getByText, getByAltText } = render(
<ProfilePhoto />,
)
const file = new File(['(⌐□_□)'], 'chucknorris.png', { type: 'image/png' })
const imageInput = getByLabelText('choose image')
Simulate.change(imageInput, { target: { files: [file] } })
@fmoliveira
fmoliveira / settings.json
Created August 23, 2020 01:41
My Windows Terminal Settings
// This file was initially generated by Windows Terminal 1.1.2233.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@fmoliveira
fmoliveira / Readme.md
Created June 28, 2020 01:18 — forked from colllin/Readme.md
Auth0 + FaunaDB integration strategy

Goal

Solutions

At the very least, we need two pieces of functionality:

  1. Create a user document in Fauna to represent each Auth0 user.
  2. Exchange an Auth0 JWT for a FaunaDB user secret.
@fmoliveira
fmoliveira / fetch-timeout.js
Created June 24, 2020 19:07 — forked from davej/fetch-timeout.js
Add a pseudo timeout/deadline to a request using the ES6 fetch api
Promise.race([
fetch('/foo'),
new Promise((_, reject) =>
setTimeout(() => reject(new Error('Timeout')), 7000)
)
]);
@fmoliveira
fmoliveira / VS Code Extensions.md
Last active June 12, 2020 09:35
Extensive Research on VS Code Marketplace for extensions that can make us more productive
  • Researched on 05/20/2020
    • Total Extensions Seen
      • Featured: 12
      • Trending: 36
      • Most Popular: 1026
      • Total: 1074 extensions seen manually on the VS Code Marketplace
    • Pre-selected
      • 83 extensions + some themes and a few icon sets
      • Complete list removed from this file for brevity
  • Triaged
@fmoliveira
fmoliveira / README.md
Last active June 12, 2020 05:16 — forked from onomatopellan/wsl.conf
/etc/wsl.conf Avoid adding Windows Path to Linux $PATH

Right now access to /mnt folders in WSL2 is too slow and by default at launch the entire Windows PATH is added to the Linux $PATH so any Linux binary that scans $PATH will make things unbearably slow. #5159

The best for now is using appendWindowsPath=false and adding folders to the $PATH manually. For example for VSCode you only need: export PATH=$PATH:"/mnt/c/Users/onoma/AppData/Local/Programs/Microsoft VS Code/bin" replacing onoma with your Windows username.

Source: microsoft/WSL#4498 (comment)