Skip to content

Instantly share code, notes, and snippets.

View IsTheJack's full-sized avatar
🇮🇪
Dublin

Roberto Oliveira IsTheJack

🇮🇪
Dublin
View GitHub Profile
@soulmachine
soulmachine / jwt-expiration.md
Last active April 9, 2024 04:12
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:

@wenzhixin
wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active January 16, 2024 21:15
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@robotlolita
robotlolita / oop.md
Last active May 24, 2023 21:23
O que é OOP? Por que Java não deve ser considerado uma linguagem com um bom suporte para esse paradigma?

Objeto é a noção de uma entidade que é definida inteiramente pelo seu comportamento. E esse comportamento é dinâmicamente selecionado. Em outras palavras, eu "peço" um objeto para "andar," e como ele vai fazer isso é inteiramente definido pelo objeto.

O exemplo:

objeto.anda()

Captura bem essa idéia. Eu tenho uma mensagem "anda," mas eu não consigo dizer o que essa função faz direto do meu código, porque isso depende no comportamento dinâmico da execução do programa (em uma linguagem estáticamente tipada você consegue optimizar isso, mas o raciocínio do código continua o mesmo).

@deekayen
deekayen / 1-1000.txt
Last active March 27, 2024 21:34
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that