Skip to content

Instantly share code, notes, and snippets.

View franciscocpg's full-sized avatar

Francisco Guimarães (chico) franciscocpg

View GitHub Profile
@franciscocpg
franciscocpg / README.md
Last active November 19, 2021 03:42
Enable bluetooth headset archlinux + deepin
yay -S bluez bluez-utils pulseaudio-alsa pulseaudio-bluetooth
pulseaudio -k
pulseaudio --start
sudo systemctl restart bluetooth.service 

Then use the bluetooth manager from deepin to connect to a device.

Or via terminal

@franciscocpg
franciscocpg / measure.js
Last active July 21, 2020 14:00
Measure execution time
async measure(id, f) {
const finalId = `${id}-${new Date().getTime()}`;
console.time(finalId);
const res = await f();
console.timeEnd(finalId);
return res;
}
/**
Example
@franciscocpg
franciscocpg / README.md
Created May 30, 2020 11:20
Install epic games with lutris on arch linux
yay -S wine-staging giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader vulkan-intel lib32-vulkan-intel lib32-mesa

Open lutris and install Epic Games

@franciscocpg
franciscocpg / README.md
Created May 4, 2020 11:45
Yay install old version

Install old versions using the flag -U poiting to the archive URL. Eg:
yay -U https://archive.archlinux.org/packages/v/vte-common/vte-common-0.58.3-1-x86_64.pkg.tar

@franciscocpg
franciscocpg / enzyme_render_diffs.md
Created February 12, 2020 14:01 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@franciscocpg
franciscocpg / ckad-learning.md
Created January 22, 2020 21:26 — forked from benc-uk/ckad-learning.md
Certified Kubernetes Application Developer (CKAD)
@franciscocpg
franciscocpg / README.md
Created November 5, 2019 22:19
Try to stop some system freezes in arch linux
@franciscocpg
franciscocpg / install-docker.sh
Last active March 15, 2025 21:53
Install docker arch EndeavourOS
set -e
yay -S docker
sudo usermod -aG docker $USER
newgrp docker
sudo systemctl enable docker
sudo systemctl start docker
@franciscocpg
franciscocpg / jwt-expiration.md
Created May 21, 2019 20:58 — forked from soulmachine/jwt-expiration.md
How to deal with JWT expiration?

First of all, please note that token expiration and revoking are two different things.

  1. Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
  2. Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.

1. How to hadle JWT expiration

A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.

Quoted from JWT RFC: