Skip to content

Instantly share code, notes, and snippets.

View cardoso's full-sized avatar
🦀
https://linkedin.com/in/cardosodev

Matheus Cardoso cardoso

🦀
https://linkedin.com/in/cardosodev
View GitHub Profile
const userData = await storage.get(appleUid);
if (!userData) {
console.log(`[ERROR] User not found in persistent storage.`);
res.sendStatus(404);
return;
}
const response = {
@cardoso
cardoso / schema.json
Created December 19, 2022 17:48 — forked from jpflueger/schema.json
spin.toml schema (767509e)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RawAppManifestAnyVersion",
"description": "Container for any version of the manifest.",
"oneOf": [
{
"description": "A manifest with API version 1.",
"type": "object",
"required": [
"component",
@cardoso
cardoso / spin.toml.schema.json
Last active January 22, 2025 19:01
Spin App Manifest Json Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RawAppManifestAnyVersionImpl_for_TriggerConfig",
"description": "New Spin manifest versioned with `spin_manifest_version` key",
"type": "object",
"required": [
"component",
"name",
"spin_manifest_version",
"trigger",
@cardoso
cardoso / spin.toml.schema.simple.json
Created April 26, 2023 15:58
Spin Manifest Simplified
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RawAppManifestAnyVersionImpl_for_TriggerConfig",
"description": "New Spin manifest versioned with `spin_manifest_version` key",
"type": "object",
"required": [
"component",
"name",
"spin_manifest_version",
"trigger",
import { Plugin } from "vite";
export default function bsodPlugin(): Plugin {
return {
name: 'vite-plugin-blue-screen-of-death',
apply: 'serve',
transformIndexHtml(html) {
const css = `body {
font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
background: #3973aa;
@cardoso
cardoso / check-package-json.ts
Created July 15, 2025 17:50
check-package-json.ts
import type { Dirent } from 'node:fs';
import { readFile, writeFile, glob, readdir } from 'node:fs/promises';
import * as path from 'node:path';
const ROOT = path.resolve(import.meta.dirname, '..');
const PACKAGE_JSON = 'package.json';
function parseJson(text: string): unknown {
return JSON.parse(text);
}