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
#!/bin/bash | |
# Use the dedicated GPU | |
export DRI_PRIME=1 | |
export MESA_LOADER_DRIVER_OVERRIDE=radeonsi | |
export vblank_mode=1 | |
export mesa_glthread=true | |
export AMD_DEBUG=nir | |
export MESA_NO_ERROR=1 |
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
export default defineNuxtRouteMiddleware(async (to) => { | |
const { loggedIn, user, clear } = useUserSession() | |
const auth = to.meta.auth as | |
| undefined | |
| boolean | |
| { | |
unauthenticatedOnly: boolean | |
navigateAuthenticatedTo: string | undefined | |
} |
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
swipe: | |
4: | |
right: | |
sendkey: 'LEFTALT+RIGHT' # History forward | |
left: | |
sendkey: 'LEFTALT+LEFT' # History back | |
up: | |
sendkey: 'LEFTCTRL+t' # Open new tab | |
keypress: | |
LEFTSHIFT: |
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 { Config } from "tailwindcss" | |
import { | |
argbFromHex, | |
hexFromArgb, | |
Hct, | |
SchemeContent, | |
} from "@material/material-color-utilities" | |
const SOURCE_COLOR = "#0192d1" | |
const argb = argbFromHex(SOURCE_COLOR) |
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
{ | |
"[dockerfile]": { | |
"editor.defaultFormatter": "ms-azuretools.vscode-docker" | |
}, | |
"[dotenv]": { | |
"editor.defaultFormatter": "foxundermoon.shell-format" | |
}, | |
"[html]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, |
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
Free Windows Server 2022 Standard Product Key | |
HP9DJ-NK2X6-4QPCH-8HY8H-6X2XY | |
RRNMT-FP29D-CHKCH-GWQP2-DDDVB | |
44QN4-X3R72-9X3VK-3DWD6-HFWDM | |
Free Windows Server 2022 Datacenter Product Key | |
WX4NM-KYWYW-QJJR4-XV3QB-6VM33 | |
Download windows Sever 2022 Evaluation edition: | |
Windows Server 2022 Evaluation English |
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
// ~/server/api/sse.ts | |
export default defineEventHandler(async (event) => { | |
if (!process.dev) return { disabled: true } | |
// Enable SSE endpoint | |
setHeader(event, 'cache-control', 'no-cache') | |
setHeader(event, 'connection', 'keep-alive') | |
setHeader(event, 'content-type', 'text/event-stream') | |
setResponseStatus(event, 200) |
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
#!/usr/bin/env bash | |
set -uo pipefail | |
_VSCODEDIR="$HOME/.vscode-insiders/extensions" | |
_COPILOTDIR=$(ls "${_VSCODEDIR}" | grep -E "github.copilot-[1-9].*" | sort -V | tail -n1) # For copilot | |
_COPILOTDEVDIR=$(ls "${_VSCODEDIR}" | grep "github.copilot-nightly-" | sort -V | tail -n1) # For copilot-nightly | |
_COPILOTLABSDIR=$(ls "${_VSCODEDIR}" | grep "github.copilot-labs-" | sort -V | tail -n1) # For gitHub.copilot-labs | |
_EXTENSIONFILEPATH="${_VSCODEDIR}/${_COPILOTDIR}/dist/extension.js" |
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
#!/usr/bin/env node | |
const path = require('path') | |
const generatorHelper = require('@prisma/generator-helper') | |
const { Project, StructureKind, VariableDeclarationKind } = require('ts-morph') | |
generatorHelper.generatorHandler({ | |
onManifest(config) { | |
return { | |
prettyName: 'Filters', | |
defaultOutput: path.resolve(__dirname, 'filters'), |
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
// https://medium.com/@awesboss/how-to-find-missing-indexes-on-foreign-keys-2faffd7e6958 | |
describe('database', () => { | |
describe('performance', () => { | |
it('has indexes on all foreign keys', async () => { | |
const query = ` | |
WITH indexed_tables AS ( | |
select | |
ns.nspname, | |
t.relname as table_name, |
NewerOlder