Skip to content

Instantly share code, notes, and snippets.

View michielmulders's full-sized avatar

Michiel Mulders michielmulders

View GitHub Profile
@michielmulders
michielmulders / createAccAndFT.json
Last active November 22, 2023 23:47
(test) Create account and create token script
View createAccAndFT.json
{
"scripts": [
{
"name": "createAccAndFT",
"commands": [
"network use testnet",
"account create -a random",
"token create-ft -n m -s mm -d 2 -i 1000 -a 302e020100300506032b6570042204202a6568253a539643468dda3128a734c9fcb07a927b3f742719a869db731f9f50 -t 0.0.4536940 -k 302e020100300506032b6570042204202a6568253a539643468dda3128a734c9fcb07a927b3f742719a869db731f9f50"
]
},
@michielmulders
michielmulders / .env
Last active April 15, 2023 15:45
Hedera Consensus Service (code example)
View .env
OPERATOR_ID=
OPERATOR_PVKEY=
@michielmulders
michielmulders / token-admin-update-supply.js
Created March 28, 2023 08:42
Admin key updates supply key on NFT (Hedera Hashgraph)
View token-admin-update-supply.js
console.clear();
require("dotenv").config();
const {
AccountId,
PrivateKey,
Client,
TokenCreateTransaction,
TokenUpdateTransaction,
TokenType,
@michielmulders
michielmulders / HIP412-1.0.0.json
Last active November 9, 2022 12:40
HIP412@1.0.0 - JSON schema implementation for collectible NFTs on Hedera (v1.0.0)
View HIP412-1.0.0.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"version": "1.0.0",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this token represents."
},
@michielmulders
michielmulders / utils.js
Created August 22, 2022 10:58
Hedera Utils for account and token creation using Hedera JS SDK
View utils.js
const {
TokenCreateTransaction,
Hbar,
AccountCreateTransaction,
PrivateKey
} = require("@hashgraph/sdk");
/*
* @return {AccountId} accountId
*/
@michielmulders
michielmulders / books.json
Created December 24, 2020 19:58
MeiliSearch books dataset (GoodReads)
View books.json
[
{
"id": "1",
"title": "Harry Potter and the Half-Blood Prince",
"author": "J.K. Rowling/Mary GrandPré",
"cover": "hard cover with dust jacket",
"language": "eng",
"publisher": "Scholastic Inc.",
"details": {
"isbn": "0439785960",
@michielmulders
michielmulders / post.go
Created December 16, 2020 10:56
Post request Go web server
View post.go
package main
import (
"log"
"net/http"
"io/ioutil"
)
func postRoute(rw http.ResponseWriter, req *http.Request) {
body, err := ioutil.ReadAll(req.Body)
@michielmulders
michielmulders / books.json
Last active December 15, 2020 18:13
MeiliSearch GoodReads dataset
View books.json
[
{
"id": "1",
"title": "Harry Potter and the Half-Blood Prince",
"author": "J.K. Rowling/Mary GrandPré",
"cover": "hard cover with dust jacket",
"language": "eng",
"publisher": "Scholastic Inc.",
"details": {
"isbn": "0439785960",
@michielmulders
michielmulders / books.json
Created December 15, 2020 17:06
MeiliSearch books dataset
View books.json
[{"id":"1","title":"Harry Potter and the Half-Blood Prince","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"0439785960","rating":"4.57","pages":"652"}},{"id":"2","title":"Harry Potter and the Order of the Phoenix","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"0439358078","rating":"4.49","pages":"870"}},{"id":"4","title":"Harry Potter and the Chamber of Secrets","author":"J.K. Rowling","cover":"soft cover","language":"eng","publisher":"Scholastic","details":{"isbn":"0439554896","rating":"4.42","pages":"352"}},{"id":"5","title":"Harry Potter and the Prisoner of Azkaban","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"043965548X","rating":"4.56","pages":"435"}},{"id":"13","title":"The Ultimate Hitchhiker's Guide to the Galaxy (Hitchh
@michielmulders
michielmulders / blogs.json
Created December 4, 2020 18:20
MeiliSearch tutorial LogRocket: Modified blogs.json dataset
View blogs.json
[{"id":"0","source_name":"Reuters","author":"Reuters Editorial","title":"NTSB says Autopilot engaged in 2018 California Tesla crash","description":"The National Transportation Safety Board said Tuesday a Tesla Model S was in Autopilot mode when it struck a fire truck in Culver City, California -- one of a series of crashes the board is investigating involving Tesla's driver assistance system.","url":"https://www.reuters.com/article/us-tesla-crash-idUSKCN1VO22E","image":"https://s4.reutersmedia.net/resources/r/?m=02&d=20190903&t=2&i=1425817142&w=1200&r=LYNXNPEF821HS","published":"2019-09-03T16:22:20Z","publication_year":2019,"content":"WASHINGTON (Reuters) - The National Transportation Safety Board said Tuesday a Tesla Model S was in Autopilot mode when it struck a fire truck in Culver City, California one of a series of crashes the board is investigating involving Tesla’s driver assistance… [+478 chars]"},{"id":"1","source_name":"The Irish Times","author":"Eoin Burke-Kennedy","title":"Unemployment falls to po