Skip to content

Instantly share code, notes, and snippets.

@bravo-kernel
bravo-kernel / en-us.po
Created March 29, 2023 06:06
Select correct language file.
.
@bravo-kernel
bravo-kernel / Docusaurus-enriched.mdx
Created June 25, 2022 16:47
Three .mdx indentation cases to be fixed

EXAMPLE 1

function BeAwesome($ActualValue, [switch] $Negate)
{

[bool] $succeeded = $ActualValue -eq 'Awesome'
    if ($Negate) { $succeeded = -not $succeeded }

    if (-not $succeeded)
@bravo-kernel
bravo-kernel / bytesToHex.js
Created February 15, 2022 15:27
Convert bytes array to hex in Javascript
/**
* Converts a bytes array into a hex string.
*
* @see {@link https://stackoverflow.com/a/34310051/9850103}
* @param bytes - Array with bytes
*/
export const bytesToHex = (bytes: Array<number>) => {
return Array.from(bytes, function (byte) {
return ("0" + (byte & 0xff).toString(16)).slice(-2)
}).join("")
@bravo-kernel
bravo-kernel / grabber-error.md
Last active January 4, 2022 19:22
Ergo grabber error
15:51:48.522 WARN  o.e.explorer.indexer.processes.ChainIndexer - An error occurred while syncing with the network. Restarting ... 
org.http4s.InvalidMessageBodyFailure: Invalid message body: Could not decode JSON: {
  "currentTime" : 1641311509124,
  "network" : "mainnet",
  "name" : "ergo-mainnet-4.0.16",
  "stateType" : "utxo",
  "difficulty" : null,
  "bestFullHeaderId" : null,
  "bestHeaderId" : "b2c1317e6e429facc1114cf2481f3b8cc02b23472ae57ffadf3165df7bffe3b6",

JSON Schema Draft 2019-09

These schemas were automatically generated on 2021-12-18 using these Sequelize models and the most recent version of sequelize-to-json-schemas. To confirm that these are indeed all valid schemas use:

User Model

JSON Schema Draft 2019-09

These schemas were automatically generated on 2021-12-18 using these Sequelize models and the most recent version of sequelize-to-json-schemas. To confirm that these are indeed all valid schemas use:

User Model

@bravo-kernel
bravo-kernel / 4x-ada-yield-streams-ELI5.md
Last active October 31, 2021 13:55
4x ADA yield streams (ELI5)

4x ADA Yield Streams (ELI5)

  • update and verify yield fields
  • update and verify revenue fields
  • update and verify risk

1. Stake ADA

Default ADA staking as provided by Cardano. Optional and not related to, nor required for, any of the Liqwid examples below.

@bravo-kernel
bravo-kernel / validations.ts
Created August 16, 2021 07:15
Blitzjs validations example
import { z } from "zod"
const id = z.number().int()
const Project = z.object({
id: id,
name: z.string(),
description: z.string().optional().nullable(),
customerId: z.number().int(),
})
@bravo-kernel
bravo-kernel / LoginForm.js
Last active July 31, 2021 21:11
Mantine theme color might be undefined
import {
Anchor,
Button,
Container,
Group,
Notification,
Paper,
Text,
useMantineTheme,
} from "@mantine/core"