Skip to content

Instantly share code, notes, and snippets.

@adgang
adgang / add-system-fields.ts
Created September 6, 2023 21:33
A portable script(works with different versions of directus) to add system fields to existing collection in directus
import {
createDirectus,
createField,
readFields,
rest,
staticToken,
} from '@directus/sdk';
/**
@adgang
adgang / add-system-fields.ts
Created September 6, 2023 21:14
A script to add system fields to a directus collection
import { createDirectus, createField, rest, staticToken } from '@directus/sdk';
const collection = 'sample_collection';
const systemFields = [
{
collection: collection,
field: 'status',
type: 'string',
schema: {
name: 'status',
@adgang
adgang / challenge.md
Last active December 10, 2021 16:39
Cosmos Starport Challenge

DST Scaffolder

Introduction

We made a package for scaffolding starport artifacts with semantic checks.

Inspiration

Starport has scaffold commands to create and modify artifacts like chain, module oracle etc. Right now the code uses placeholder strings to patch code, making it dangerous and prone to issues from lint tools, formatters, etc

@adgang
adgang / sample.js
Created May 24, 2021 13:38
Sample express app
const express = require('express')
const app = express();
app.get('/api/input/:value', (req, res) => {
// do something
res.send("OK");
})
app.listen(3000)

Keybase proof

I hereby claim:

  • I am adgang on github.
  • I am adgang (https://keybase.io/adgang) on keybase.
  • I have a public key ASAtC34o5ybPUphUOfuehLlqFYrn1XEQGnj1JuW-vArCWAo

To claim this, I am signing this object: