The follwing is my working document as I create a pipeline for faster YouTube > LibSyn / iTunes distribution. This is not complete, but really cuts down on some time.
I'm a commandline guy, I like UNIX tooling philosophy. Hence, my prereqs.
| // | |
| struct TerminalCell | |
| { | |
| // cell index into GlyphTexture, should be two 16-bit (x,y) values packed: "x | (y << 16)" | |
| uint GlyphIndex; | |
| // 0xAABBGGRR encoded colors, nonzero alpha for Foreground indicates to render colored-glyph | |
| // which means use RGB values from GlyphTexture directly as output, not as ClearType blending weights | |
| uint Foreground; | 
| // own.rim.db.gundb-graphdb-api-notes.js | |
| // JavaScript based graph-DB module developer user guide wishes | |
| // created by Leonard Pauli, 28 aug 2019 | |
| // | |
| /* includes: | |
| install/access module | |
| (add, remove, change, traverse) values | |
| get current value | |
| simple data structures (set) | |
| (subscribe, unsubscribe) to changes | 
| // jQuery-like syntactic sugar. Only queries for one element. Does not loop over multiple like jQuery | |
| export function $(query) { | |
| if (typeof query === 'undefined') throw 'No query provided to $'; | |
| var el; | |
| if (typeof query.nodeType === 'string') { | |
| el = query; | |
| } else if (typeof query === 'string' && query[0] === '<') { | |
| const container = document.createElement('div'); | |
| container.innerHTML = query; | 
| import * as React from 'react'; | |
| import { | |
| View, | |
| Text, | |
| } from 'react-native'; | |
| import Gun from 'gun/gun'; | |
| import 'gun/lib/open'; | |
| import '../extensions/sea'; | 
| Gun.on('opt', function(ctx){ | |
| const ACK_ = '@'; | |
| const SEQ_ = '#'; | |
| var gun = ctx.gun; | |
| this.to.next(ctx); | |
| ctx.on('put', function(at) { | |
| this.to.next(at); | |
| ctx.on('in', {[ACK_]: at[SEQ_], gun:gun, ok: 1}); | 
| /* You'll need this on your client | |
| Gun.on('opt', function (ctx) { | |
| if (ctx.once) { | |
| return | |
| } | |
| ctx.on('out', function (msg) { | |
| var to = this.to | |
| // Adds headers for put | |
| msg.headers = { | |
| token: 'thisIsTheTokenForReals' | 
| const stream = require('stream') | |
| const Gun = require('gun') | |
| const randomString = length => { | |
| const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
| let text = '' | |
| for (var i = 0; i < length; i++) { | |
| text += possible[Math.floor(Math.random() * possible.length)] | |
| } | |
| return text | 
The follwing is my working document as I create a pipeline for faster YouTube > LibSyn / iTunes distribution. This is not complete, but really cuts down on some time.
I'm a commandline guy, I like UNIX tooling philosophy. Hence, my prereqs.
| function rndBase32(len) { | |
| return ( ~~(Math.random() * Math.pow(32, len)) ).toString(32); | |
| } |