Skip to content

Instantly share code, notes, and snippets.

@merrickread
merrickread / sanityGroqZod.ts
Last active February 1, 2024 21:31
Sanity + Groq + Zod
// Okay, hope this track and makes sense. Created with the help of GPT
// Say we have Sanity Schema and client
import sanityClient from '@sanity/client';
const client = sanityClient({
projectId: 'yourProjectId', // Replace with your project ID
dataset: 'yourDataset', // Replace with your dataset name
useCdn: true, // `false` if you want fresh data
});
export type Video = {
id: number,
title: string,
description: string,
categories: number[],
keywords: string[],
live: boolean,
metadata: {
[name: string]: string
},
@merrickread
merrickread / identity.go
Created September 19, 2017 14:51
This is buggy and might not be worth the time. Was put together in a rush for a demo in China
package main
import (
"errors"
"fmt"
"github.com/hyperledger/fabric/core/chaincode/shim"
"encoding/json"
)
// SimpleChaincode example simple Chaincode implementation
@merrickread
merrickread / identity.go
Created September 19, 2017 14:50
This is buggy and might not be worth the time
package main
import (
"errors"
"fmt"
"github.com/hyperledger/fabric/core/chaincode/shim"
"encoding/json"
)
// SimpleChaincode example simple Chaincode implementation

Keybase proof

I hereby claim:

  • I am merrickread on github.
  • I am merrickread (https://keybase.io/merrickread) on keybase.
  • I have a public key whose fingerprint is 94F1 DF08 6541 FD38 C90A 49CC EF80 94E1 4A2F 3966

To claim this, I am signing this object:

var socket = new WebSocket("ws://localhost:8081");
var stat;
var lines = [];
var dataIn;
var lineIn;
var dataPoints = []; // array of our datapoint objects
{
"links": {
"self": "http://localhost:3009/translations"
},
"data": [
{
"id": "56d9be5335df00a6d95ccb68",
"type": "translations",
"attributes": {
"locale": "en",