Skip to content

Instantly share code, notes, and snippets.

View MattiaCostamagna's full-sized avatar
🌍

Mattia Costamagna MattiaCostamagna

🌍
View GitHub Profile
@alexpulver
alexpulver / toolchain.py
Last active November 12, 2021 07:12
Enable CodeBuild cache for CDK Pipelines synth step
synth_codebuild_step = pipelines.CodeBuildStep(...)
codepipeline = pipelines.CodePipeline(
self,
"CodePipeline",
synth=synth_codebuild_step,
)
# That should be called at the end of the pipeline definition, because the pipeline can't be changed afterwards
codepipeline.build_pipeline()
synth_cfn_project: codebuild.CfnProject = codepipeline.synth_project.node.default_child
synth_cfn_project.cache = codebuild.CfnProject.ProjectCacheProperty(type="LOCAL", modes=["LOCAL_SOURCE_CACHE"])

NOT UP TO DATE!

Things in this document might not work or be broken nowadays

my laptop:

I'm writing this here because a few things in here are spesific to this model laptop.
Dell XPS 15 9560 (4k) touch screen

Some notes:

Most things after setup are not specific for this laptop
# = run as root

@velut
velut / guida_tilde_backtick_windows10.md
Last active June 3, 2024 06:34
Guida per digitare i caratteri tilde (~) e backtick (`) su una tastiera italiana con Windows 10

Come digitare i caratteri tilde (~) e backtick (`) su una tastiera italiana con Windows 10

Inserire o scrivere caratteri come tilde (~) e backtick (`) con Windows non è immediato data la loro assenza nel layout della tastiera italiana.

È comunque possibile utilizzare questi caratteri sia sfruttando una combinazione di tasti fornita da Windows (vedi Soluzione Windows) sia creando una combinazione di tasti personalizzata (vedi Soluzione Personalizzata).
Entrambe le soluzioni non richiedono di cambiare il layout predefinito della tastiera o le impostazioni di input di Windows 10.

Soluzione Windows

Questa soluzione consiste nel digitare un codice sul tastierino numerico mentre viene tenuto premuto il tasto Alt.

@soulmachine
soulmachine / jwt-expiration.md
Last active June 16, 2024 12:26
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: