Skip to content

Instantly share code, notes, and snippets.

View Slumber86's full-sized avatar
πŸ“Έ

Agostino Marzotta Slumber86

πŸ“Έ
View GitHub Profile
@Joao-Peterson
Joao-Peterson / gmk67-manual.md
Last active May 6, 2025 14:25
GMK67 manual (English)
@samsch
samsch / stop-using-jwts.md
Last active April 10, 2025 08:31
Stop using JWTs

Stop using JWTs!

TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.

If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)

A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/

The reason to avoid JWTs comes down to a couple different points:

  • The JWT specification is specifically designed only for very short-live tokens (~5 minute or less). Sessions
@henfiber
henfiber / KB-Buying-guide-EU.md
Last active April 30, 2025 09:19
Buying keyboards and keyboard components from EU

Europe

  • SkinFlintΒ : Price comparison site which has some nice filtering options per switch type etc. Searches for offers in UK, Germany, Poland and Austria
  • mykeyboard.euΒ : Keyboards, keycaps and accessories. Based in Belgium.
  • candykeys.comΒ : European Store selling Vortex, Leopold, KBP, Anne Pro keyboards, keycap sets and components (ISO + ANSI). Based in Germany, ships to EU.
  • falba.techΒ : custom wooden bamboo cases, and some acrylic and carbon ones. Switch packs (65 browns at 48EUR). Other parts for the GH60, Atreus, ErgoDox. Also Microcontrollers, diodes, leds etc.
  • 42keebs.eu - Mostly PCBs, tools and accessories. Located in Czech Republic.
  • KEYGEM : Switches, Keycaps, lubes, cables, DIY kits and deskmats. Based in Germany, ships to the EU and worldwide.
  • [Eloquent Clicks - Custom Mechanical Keyboard Store](https://www.eloquen
@emadb
emadb / eslint.config.js
Last active October 28, 2016 14:21
My Eslint configuration
{"rules": {
// https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
/* best practices */
"accessor-pairs": 0,
// enforces return statements in callbacks of array's methods
// http://eslint.org/docs/rules/array-callback-return
"array-callback-return": 2,
// treat var statements as if they were block scoped
"block-scoped-var": 2,
// specify the maximum cyclomatic complexity allowed in a program
@acamino
acamino / README.md
Last active April 13, 2025 14:19
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut β€” Action

  • CTRL + A β€” Move to the beginning of the line
  • CTRL + E β€” Move to the end of the line
  • CTRL + [left arrow] β€” Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] β€” Move one word forward (on some systems this is ALT + F)
  • CTRL + U β€” (bash) Clear the characters on the line before the current cursor position
  • CTRL + U β€”(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K β€” Clear the characters on the line after the current cursor position
  • ESC + [backspace] β€” Delete the word in front of the cursor
@potatosalad
potatosalad / jwk_ed25519.json
Last active June 28, 2019 10:14
Example keys for JOSE.JWS documentation https://hexdocs.pm/jose
{
"crv": "Ed25519",
"d": "VoU6Pm8SOjz8ummuRPsvoJQOPI3cjsdMfUhf2AAEc7s",
"kty": "OKP",
"x": "l11mBSuP-XxI0KoSG7YEWRp4GWm7dKMOPkItJy2tlMM"
}
@DorianRudolph
DorianRudolph / LICENSE.txt
Last active April 8, 2025 19:51
Arduino PS2 to USB HID Keyboard Converter
Copyright (c) 2015, Dorian Rudolph
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@ksol
ksol / chrome_39.js
Last active July 10, 2021 13:37
Language detection in javascript
window.navigator.language // -> "fr"
window.navigator.languages // -> ["fr-FR", "fr", "en-US", "en", "es", "de"]
window.navigator.userLanguage // -> undefined
window.navigator.browserLanguage // -> undefined
window.navigator.systemLanguage // -> undefined
@staltz
staltz / introrx.md
Last active May 6, 2025 07:45
The introduction to Reactive Programming you've been missing