Skip to content

Instantly share code, notes, and snippets.

View Jhoem's full-sized avatar
🏠
Working from home

Jhoemer Costales Jhoem

🏠
Working from home
  • www.arcanys.com
  • Philippines
View GitHub Profile
@Jhoem
Jhoem / jwt.strategy.ts
Last active November 22, 2023 06:41
Sample logout on nestjs using Cache manager w/ Redis for invalidating tokens
View jwt.strategy.ts
async logout({ jwt }) {
const { token, exp: expirationTime = 0 } = jwt;
// Convert current date to timestamp in seconds
const currentTimestamp = Math.floor(Date.now() / 1000);
const remainingTTL = expirationTime - currentTimestamp;
if (remainingTTL <= 0) {
throw new UnauthorizedException(AuthErrors.tokenExpired);
}
@Jhoem
Jhoem / gist:536cc8f85dedf6f36376b71784691498
Created June 30, 2022 05:28 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:536cc8f85dedf6f36376b71784691498

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
View screen_cheatsheet.markdown

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r