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 April 26, 2022 02:07
Entropy Hero (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / readme.txt
Created April 26, 2022 01:54
Entropy Hero (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html

First, we do not have functions. We only have subroutines that read or write existing memory space. The language resembles assembly language, but is actually high-level. A subroutine may define local memory (equivalent to the stack frame), but all of that is lost when the subroutine completes.

# Approximately convert fahrenheit to celsius
subroutine fahren-to-celsius {
  read f32 fahren
  write f32 celsius
  # temp is not necessary here, but used for illustrative purposes
  local f32 temp
  # copy the fahren value into temp. Not that '\n' and ';' are interchangable
@jayrbolton
jayrbolton / feathericons-snabbdom.md
Created February 24, 2021 05:11
Using feathericons with Snabbdom

How to use feathericons with Snabbdom

Create an icon component function, like so:

// Pass in the icon name
module.exports = function icon (name) {
  const style = {
    width: '24px',
 height: '24px',
@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
@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
#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) {

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: 
@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
@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: