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 { startSpan } from "@sentry/remix"; | |
import type { StartSpanOptions } from "@sentry/types"; | |
import { | |
type AnyColumn, | |
type AnyTable, | |
type BuildQueryResult, | |
type DBQueryConfig, | |
type DrizzleTypeError, | |
type Equal, | |
type ExtractTablesWithRelations, |
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 { and, type DBQueryConfig, eq, type SQLWrapper } from "drizzle-orm"; | |
import { drizzle } from "drizzle-orm/postgres-js"; | |
import postgres, { type Sql } from "postgres"; | |
import { type AnyArgs } from "@/common"; | |
import { | |
type DbClient, | |
type DbTable, | |
type DeleteArgs, |
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
// Generates the SAPISIDHASH token Google uses in the Authorization header of some API requests | |
async function getSApiSidHash(SAPISID, origin) { | |
function sha1(str) { | |
return window.crypto.subtle.digest("SHA-1", new TextEncoder("utf-8").encode(str)).then(buf => { | |
return Array.prototype.map.call(new Uint8Array(buf), x=>(('00'+x.toString(16)).slice(-2))).join(''); | |
}); | |
} | |
const TIMESTAMP_MS = Date.now(); | |
const digest = await sha1(`${TIMESTAMP_MS} ${SAPISID} ${origin}`); |
Based on Evan You's methodology: https://github.com/yyx990803/vue-svelte-size-analysis
Vue | Vue (SSR) | Svelte | Svelte (SSR) | Solid | Solid (SSR) | |
---|---|---|---|---|---|---|
Source | 3.93kb | - | 3.31kb | - | 4.98kb | - |
Compiled w/o imports (min) | 2.73kb | - | 5.01kb (183.52%) | 6.59kb (241.39%) | 3.68kb (134.805) | 3.96kb (145.05%) |
Compiled w/o imports (min+gz) | 1.25kb | - | 2.13kb (170.40%) | 2.68kb (214.40%) | 1.46kb (116.80%) | 1.57kb (125.60%) |
Compiled w/o imports (min+brotli) | 1.10kb | - | 1.88kb (170.91%) | 2.33kb (211.82%) | 1.26kb (114.55%) | 1.32kb (120.00%) |
Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!
Four things needed overall:
- you need WSL2, not WSL1
- you need node, of course, and that part isn't so bad
- you need to
apt install
several dependencies - you need an X Server so it can display the electron GUI over in Windows-land
Setup instructions, in order:
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#SingleInstance force | |
drag_enabled := 0 | |
+^#F22:: |
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
"use strict"; | |
const fastify = require("fastify"); | |
const app = fastify(); | |
const serverless = require("serverless-http"); | |
app.get("/test", (request, reply) => { | |
reply.send({ hello: "world" }); | |
}); | |
app.get("/test/one", (request, reply) => { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder