Skip to content

Instantly share code, notes, and snippets.

View lynsei's full-sized avatar
:octocat:
Huzzah!

Lynsei lynsei

:octocat:
Huzzah!
View GitHub Profile
@lynsei
lynsei / docs-glossary.md
Last active June 16, 2022 08:35
[Lysei Brand Architecture Glossary] Glossary of Terms to provide definitions to people who do not understand my AI/ML architecture or who haven't yet been exposed to any form of documentation.

Definitions Glossary

Lynsei Brand Architecutre Definitions Registry

These are all very common terms in Lynsei Brand Architecture, which can include all sorts of references to AI/ ML, Socio Technical Theory, Decision Making, Distributed Systems, and other types of problem solving methods, behavior-driven systems and methods, and resolution techniques for project and people management, assuaging, and to ensure the competency of a team or project.

Term Definition
2022 Rollout Plans "Rollout" is a strong word. Perhaps it is best said that I wish to "Integrate" with other depts. pending James' final approval. More on the plans here.
Isomorphic Design Like this. It follows the Single Responsiblity Principle of 12 factor apps, and produces really clean code that is easy to read and short to type. It fits in
@lynsei
lynsei / multi-region-immutable-architecture.md
Created February 14, 2022 05:13
insertonly.com > I bought this domain so I can declaratively mark my ingest, archive, and delete endpoints for the CockRoachDB Multi-Region deployment
@lynsei
lynsei / record-level.md
Created February 10, 2022 15:14
[gpg in postgres] #quickreference #database #postgres #gpg #inrow

Generate random bytea:

CREATE OR REPLACE FUNCTION random_bytea(bytea_length integer)
RETURNS bytea AS $body$
    SELECT decode(string_agg(lpad(to_hex(width_bucket(random(), 0, 1, 256)-1),2,'0') ,''), 'hex')
    FROM generate_series(1, $1);
$body$
LANGUAGE 'sql'
VOLATILE
@lynsei
lynsei / orm-cheatsheet.md
Created February 10, 2022 11:08
[Public ORM Notes] #recent #notes on a bunch of #orm systems I've #evaluated for using with #rethinkdb and a system I'm constructing for #crypto

This is completely a bunch of fragments of code that may or may not work.

//----------------------------------------------------- 
// lynsei database cheat sheet 
//----------------------------------------------------- 
// export postgres to json schema for use as rethink tables 
var PostgresSchema = require('pg-json-schema-export'); 
var connection = 
  user: 'postgres', 
@lynsei
lynsei / specialists.md
Created February 10, 2022 11:06
[lynsei quote] #quote #lynsei #asynynivynya

"To specialize is commonplace. "

"To show extraordinary knowledge in a great many things, is not."

-Lynsei Asynynivynya

@lynsei
lynsei / gpg.py
Created February 9, 2022 16:08
#gpg #python #utility
"""gpg.py - Collection of gpg key related functions"""
from cloudinit import log as logging
from cloudinit import subp
import time
LOG = logging.getLogger(__name__)
GPG_LIST = ['gpg', '--with-fingerprint', '--no-default-keyring', '--list-keys',
@lynsei
lynsei / fsm.refex.py
Last active February 8, 2022 04:21
[python3 finite state machine FSM] #implementation #python #finite #state #machine #fsm #regex
"""
A finite state machine specialized for regular-expression-based text filters,
this module defines the following classes:
- `StateMachine`, a state machine
- `State`, a state superclass
- `StateMachineWS`, a whitespace-sensitive version of `StateMachine`
- `StateWS`, a state superclass for use with `StateMachineWS`
- `SearchStateMachine`, uses `re.search()` instead of `re.match()`
- `SearchStateMachineWS`, uses `re.search()` instead of `re.match()`
@lynsei
lynsei / many-to-many.sql
Created February 5, 2022 15:33
[postgres relationship example patterns] These are #example #patterns in #postgres for #many-to-many #one-to-many, and #advanced-sql-patterns for very large tables using #rethinkdb as a cache
-- To uninstall demonstration:
-- Delete the `_manytomany` schema from the expanded page on the left
-- or you may run: `DROP SCHEMA IF EXISTS _manytomany` from the SQL tab to the left
--
-- Please be careful before running, as all data in the schema will be removed
-- Create Schema
CREATE SCHEMA _manytomany;
-- Create Tables
@lynsei
lynsei / nifty.biscuits.js
Created February 5, 2022 13:24
[nifty.biscuits] It is true
// My biscuits are nifty my Crypto is minty. It may seem like I'm wimpy and I like ren and stimpy.
@lynsei
lynsei / crypto-codecs.csv
Last active February 8, 2022 02:53
[a very useful crypto/codec list] #docs #documentation #codec #crypto #encoder #encryption
name tag code status description
identity multihash 0x00 permanent raw binary
cidv1 cid 0x01 permanent CIDv1
cidv2 cid 0x02 draft CIDv2
cidv3 cid 0x03 draft CIDv3
ip4 multiaddr 0x04 permanent
tcp multiaddr 0x06 permanent
sha1 multihash 0x11 permanent
sha2-256 multihash 0x12 permanent
sha2-512 multihash 0x13 permanent