Skip to content

Instantly share code, notes, and snippets.

View sell's full-sized avatar
🖤
learning

Sell sell

🖤
learning
  • United States
View GitHub Profile
@sell
sell / eval.js
Created August 24, 2020 05:25
eval command discord.js
const { MessageEmbed } = require('discord.js');
module.exports = {
name: 'eval',
run: async (client, message, args) => {
if (message.author.id !== '737794159167012905') return
const embed = new MessageEmbed()
.setTitle('Evaluating...')
const msg = await message.channel.send(embed)
try {
@soulmachine
soulmachine / jwt-expiration.md
Last active June 21, 2024 14:09
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:

@paladini
paladini / The HEX and RGB code for the Bitcoin orange color
Last active January 25, 2021 23:22
The HEX / RGB code for the orange color from Bitcoin logo
Do you want know what's the orange color from Bitcoin logo? Here's the colours:
Hexadecimal:
#FF9900
RGB
(255,153,0)
Any suggestions are welcome!
Fonts: http://www.color-hex.com/color/ff9900 and https://bitcointalk.org/index.php?topic=224522.0