Skip to content

Instantly share code, notes, and snippets.

View jayrbolton's full-sized avatar
🍕

Jay R Bolton jayrbolton

🍕
View GitHub Profile
@jayrbolton
jayrbolton / readme.txt
Created June 15, 2020 04:53
Untitled PuzzleScript Script
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / readme.txt
Created June 16, 2020 04:58
Entropy Hero (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / readme.txt
Created July 5, 2020 01:22
Entropy Hero (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / readme.txt
Created July 5, 2020 01:35
Duper (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / schema-libs.md
Created July 23, 2020 22:14
More reusable json-schemas

Goals:

  1. Allow local schemas to include other local schema files without hardcoding any absolute file paths
  2. Allow local schemas to include remote schemas, where the base URL of the remote schema can be configured (is not hard-coded)
  3. Serve schema libraries that can be used remotely over the http(s) protocol with consistent internal $id and $ref fields where the base URL can be configured

1. Including local schemas

We use a template variable called {base} to insert the project's absolute file path without hard-coding it:

@jayrbolton
jayrbolton / config.yaml
Last active August 4, 2020 19:30
Temporary test config for search indexing on kbase
# Mapping of KBase type names to index names
ws_type_to_indexes:
KBaseNarrative.Narrative: narrative
KBaseFile.PairedEndLibrary: reads
KBaseFile.SingleEndLibrary: reads
KBaseGenomesAnnotations.Assembly: assembly
KBaseGenomes.Genome: genome
KbaseGenomes.Pangenome: pangenome
KBaseGenomeAnnotations.Taxon: taxon
KBaseTrees.Tree: tree

First, we would define some base configuration that allows you to fetch, validate, and extract remote schemas:

json-schema-lib.yaml

base_dir: "schemas/"
  libs:
    lib1: 
      url: "http://spacejam.com/lib1.tar.gz"
 lib2: 
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
// NOTE defer fclose(fp)
FILE* get_filestream(char* path) {
FILE *fp;
fp = fopen(path, "rt");
if (!fp) {
@jayrbolton
jayrbolton / readme.txt
Created January 29, 2021 04:14
Replicat Sketchworld (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / readme.txt
Created January 29, 2021 04:15
Replicat Sketchworld (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html