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
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 / 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",
@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 / 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",
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 / 00-start-auth-view-controller.swift
Created April 28, 2020 20:43
Adding Sign in with Apple to your iOS App
import UIKit
import AuthenticationServices
class AuthViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
setupSignInButton()
}
func setupSignInButton() {
@cardoso
cardoso / CryptoKitE2EEPlayground.swift
Created April 4, 2020 02:47
CryptoKit End-to-end Encryption
import CryptoKit
import Foundation
var protocolSalt = "Hello, playground".data(using: .utf8)!
// generate key pairs
let sPrivateKey = Curve25519.KeyAgreement.PrivateKey()
let sPublicKey = sPrivateKey.publicKey
@cardoso
cardoso / main.js
Last active November 20, 2019 21:48 — forked from xLEWKANx/main.js
Back4App and Virgil server
const axios = require("axios");
const { JwtGenerator } = require("virgil-sdk");
const { VirgilCrypto, VirgilAccessTokenSigner } = require("virgil-crypto");
const crypto = new VirgilCrypto();
const APP_ID = "YOUR_VIRGIL_APP_ID";
const APP_KEY = "YOUR_VIRGIL_APP_KEY";
const APP_KEY_ID = "YOUR_VIRGIL_APP_ID";
const PARSE_APP_ID = "YOUR_PARSE_APP_ID";
const PARSE_REST_API_KEY = "YOUR_PARSE_REST_API_KEY";
2019/07/18 16:36:58 [INFO] Terraform version: 0.12.4
2019/07/18 16:36:58 [INFO] Go runtime version: go1.12.7
2019/07/18 16:36:58 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"}
2019/07/18 16:36:58 [DEBUG] Attempting to open CLI config file: /Users/cardoso/.terraformrc
2019/07/18 16:36:58 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/07/18 16:36:58 [INFO] CLI command args: []string{"plan"}
2019/07/18 16:36:58 [DEBUG] New state was assigned lineage "e3e211d5-d9a8-b74d-ed5a-96f6aacca0ce"
2019/07/18 16:36:58 [DEBUG] checking for provider in "."
2019/07/18 16:36:58 [DEBUG] checking for provider in "/usr/local/bin"
2019/07/18 16:36:58 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64"
Sound Index FileName Volume Group Size Loop Fade In Fade Out Defer Inst Stop Inst Duration Compound Reverb Falloff Cache Async Only Priority Stream Stereo Tracking Solo Music Vol Block 1 Block 2 Block 3
0 none.wav 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1
cursor_pass 1 cursor\pass.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
cursor_select 2 cursor\select.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 255 0 0 0 0 0 -1 -1 -1
cursor_error 3 cursor\windowopen.wav 255 0 0 0 0 1 0 0 0 0 1 0 0 100 0 0 0 0 0 -1 -1 -1
cursor_button_click 4 cursor\button.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
cursor_point_drop 5 cursor\pointdrop.wav 220 0 0 0 0 0 1 0 0 0 1 1 0 255 0 0 0 0 0 -1 -1 -1
cursor_switch 6 cursor\windowopen.wav 220 0 0 0 0 1 0 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
cursor_level_up 7 cursor\levelup.wav 255 0 0 0 0 1 0 0 0 0 1 0 0 255 0 0 0 0 0 -1 -1 -1
cursor_level_up_hireling 8 cursor\leveluphireling.wav 255 0 0 0 0 1 0 0 0 0 1 0 0 255 0 0 0 0 0 -1 -1 -1