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, |
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
CREATE FUNCTION get_Exact_Date_diff(@date SMALLDATETIME,@date2 SMALLDATETIME) | |
returns VARCHAR(50) | |
AS | |
BEGIN | |
DECLARE @date3 SMALLDATETIME | |
DECLARE @month INT,@year INT,@day INT |
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 { Polygon } from './types/ShapeType' | |
import { perpendicularDistance } from './utilities' | |
// distance between two points | |
function distance(p1: Point, p2: Point): number { | |
return Math.sqrt((p2.x - p1.x) ** 2 + (p2.y - p1.y) ** 2) | |
} | |
// perpendicular distance of a point from a line |
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
var trimCanvas = (function() { | |
function rowBlank(imageData, width, y) { | |
for (var x = 0; x < width; ++x) { | |
if (imageData.data[y * width * 4 + x * 4 + 3] !== 0) return false; | |
} | |
return true; | |
} | |
function columnBlank(imageData, width, x, top, bottom) { | |
for (var y = top; y < bottom; ++y) { |
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
// This file was initially generated by Windows Terminal Preview 1.1.1671.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
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
function getSvgAsImage(svgElem, viewBox) { | |
// TODO: add x,y to w,h | |
var canvas = document.createElement('canvas') | |
canvas.width = viewBox[2] | |
canvas.height = viewBox[3] | |
var ctx = canvas.getContext('2d') | |
ctx.fillStyle = '#fff' | |
ctx.fillRect(0, 0, canvas.width, canvas.height) | |
var options = { |
NewerOlder