- https://javascript.info/
- http://exploringjs.com/
- https://developer.mozilla.org/pl/docs/Web/JavaScript
- Functional Programming in JS: What? Why? How? - zajawka
- Functional Programming in JavaScript - kurs - krótki kurs
const kv = await Deno.openKv(); | |
Deno.serve(async (request: Request) => { | |
// Create short links | |
if (request.method == "POST") { | |
const body = await request.text(); | |
const { slug, url } = JSON.parse(body); | |
const result = await kv.set(["links", slug], url); | |
return new Response(JSON.stringify(result)); |
# I'll be doing another one for Linux, but this one will give you | |
# a pop up notification and sound alert (using the built-in sounds for macOS) | |
# Requires https://github.com/caarlos0/timer to be installed | |
# Mac setup for pomo | |
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\ | |
-title 'Work Timer is up! Take a Break 😊'\ | |
-appIcon '~/Pictures/pumpkin.png'\ | |
-sound Crystal" |
name old time/op new time/op delta | |
BinaryTree17 5.44s ± 2% 3.27s ± 2% -39.90% (p=0.000 n=20+19) | |
Fannkuch11 4.95s ± 2% 2.68s ± 2% -45.87% (p=0.000 n=20+20) | |
FmtFprintfEmpty 142ns ± 2% 49ns ± 3% -65.39% (p=0.000 n=20+18) | |
FmtFprintfFloat 765ns ± 2% 260ns ± 2% -66.02% (p=0.000 n=20+20) | |
FmtFprintfInt 341ns ± 2% 95ns ± 2% -72.08% (p=0.000 n=19+20) | |
FmtFprintfIntInt 554ns ± 2% 150ns ± 1% -72.95% (p=0.000 n=20+19) | |
FmtFprintfPrefixedInt 497ns ± 3% 178ns ± 3% -64.12% (p=0.000 n=20+20) | |
FmtFprintfString 466ns ± 2% 86ns ± 3% -81.54% (p=0.000 n=20+20) | |
FmtManyArgs 2.23µs ± 2% 0.59µs ± 1% -73.46% (p=0.000 n=20+17) |
First of all, please note that token expiration and revoking are two different things.
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:
upstream example-webpack { | |
server 127.0.0.1:8080; | |
} | |
upstream example-backend { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; |