This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Handle, GetSession } from '@sveltejs/kit'; | |
import * as cookie from 'cookie'; | |
import * as jsonwebtoken from 'jsonwebtoken'; | |
import { handleTokenRefresh } from '$lib/helpers/refresh'; | |
import { JWT_SECRET } from './env'; | |
const getJWT = (cookie: string): jsonwebtoken.Jwt => { | |
if (typeof cookie !== 'string' || cookie.length === 0) return; | |
return jsonwebtoken.decode(cookie, { complete: true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
original implementation: | |
https://dev.to/shajidhasan/add-a-youtube-like-page-loading-animation-in-sveltekit-58kp | |
--> | |
<script lang="ts"> | |
import { tweened } from 'svelte/motion'; | |
import { cubicOut } from 'svelte/easing'; | |
import { navigating } from '$app/stores'; | |
import { writable } from 'svelte/store'; | |
import { onMount } from 'svelte'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Untitled benchmark</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*!----------------------------------------------------------------------------- | |
* Copyright (c) Microsoft Corporation. All rights reserved. | |
* Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) | |
* Released under the MIT license | |
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt | |
*-----------------------------------------------------------------------------*/ | |
var __defProp = Object.defineProperty; | |
var __export = (target, all) => { | |
for (var name in all) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"items": [ | |
{ | |
"header": { | |
"title": "New albums & singles", | |
"browseId": "FEmusic_new_releases_albums" | |
}, | |
"results": [ | |
{ | |
"title": "Sweetest Pie", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub mod terminal; | |
use futures_util::{SinkExt, StreamExt}; | |
use std::{io::Write, net::SocketAddr}; | |
use terminal::{Pty, PtyProcess}; | |
use tokio::net::{TcpListener, TcpStream}; | |
use tokio_tungstenite::tungstenite::Result; | |
use tokio_tungstenite::{accept_async, tungstenite::Error, tungstenite::Message}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub mod terminal; | |
use futures_util::{SinkExt, StreamExt}; | |
use std::{io::Write, net::SocketAddr}; | |
use terminal::{Pty, PtyProcess}; | |
use tokio::io::{AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader}; | |
use tokio::net::{TcpListener, TcpStream}; | |
use tokio::process::{ChildStderr, ChildStdin, ChildStdout}; | |
use tokio_tungstenite::tungstenite::Result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub mod terminal; | |
use futures_util::{SinkExt, StreamExt}; | |
use std::net::SocketAddr; | |
use std::process::Stdio; | |
use std::sync::mpsc::{channel, Receiver, Sender, TryRecvError}; | |
use std::sync::Arc; | |
use std::thread::{self, sleep}; | |
use terminal::{Pty, PtyProcess}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub mod terminal; | |
use futures_util::{SinkExt, StreamExt}; | |
use std::net::SocketAddr; | |
use std::process::Stdio; | |
use std::sync::Arc; | |
use std::thread::{self, sleep}; | |
use terminal::{Pty, PtyProcess}; | |
use tokio::io::{AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader}; | |
use tokio::net::{TcpListener, TcpStream}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub mod terminal; | |
use futures_util::{SinkExt, StreamExt}; | |
use std::net::SocketAddr; | |
use std::process::Stdio; | |
use std::thread::sleep; | |
use tokio::io::{AsyncReadExt, AsyncWriteExt, BufReader}; | |
use tokio::net::{TcpListener, TcpStream}; | |
use tokio::process::{Child, Command}; |
OlderNewer