Skip to content

Instantly share code, notes, and snippets.

View manchuwook's full-sized avatar
💭
I may be slow to respond.

Steven Altsman manchuwook

💭
I may be slow to respond.
View GitHub Profile
@manchuwook
manchuwook / hlsrcharacter.ts
Created August 3, 2019 16:21
Hero Lab Shadowrun Character JSON class for Typescript
export interface Welcome {
actor: Actor;
}
export interface Actor {
actorAttr: ActorAttr;
containers: { [key: string]: Container };
picks: { [key: string]: Pick };
amendments: Amendment[];
actorSettings: { [key: string]: ActorSetting };
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
<key attr.name="label" attr.type="string" for="node" id="label"/>
<key attr.name="Edge Label" attr.type="string" for="edge" id="edgelabel"/>
<key attr.name="weight" attr.type="double" for="edge" id="weight"/>
<key attr.name="r" attr.type="int" for="node" id="r"/>
<key attr.name="g" attr.type="int" for="node" id="g"/>
<key attr.name="b" attr.type="int" for="node" id="b"/>
<key attr.name="x" attr.type="float" for="node" id="x"/>
<key attr.name="y" attr.type="float" for="node" id="y"/>
@manchuwook
manchuwook / pihole.yaml
Created May 11, 2020 16:20
PiHole Yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: pihole-admin
imagePullSecrets:
- name: dockersecret
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
hostname: guiltygear4
k3os:
data_sources:
- gcp
- cdrom
modules:
- kvm
- nvme
dns_nameservers:
@manchuwook
manchuwook / app.module.ts
Last active July 26, 2020 21:40
Creating a TypeORM entity and using it in a module
// tslint:disable: quotemark
// modules
import { Module } from '@nestjs/common';
import { CharacterModule } from './character/character.module';
import { CampaignModule } from './campaign/campaign.module';
import { PlayerModule } from './player/player.module';
import { SageModule } from './sage/sage.module';
import { TypeOrmModule } from "@nestjs/typeorm";
import { Connection } from 'typeorm';
@manchuwook
manchuwook / sample.mjs
Last active January 25, 2023 14:29
Stoplight @stoplight/json
import { parseWithPointers, safeParse, safeStringify } from "@stoplight/json";
const result = parseWithPointers(`{
"hello": "world",
"address": {
"street": 123
}
}`);
console.log(result.data);
console.log(result.pointers); // Returns undefined
@manchuwook
manchuwook / tarot.schema.json
Last active March 16, 2023 19:56
Data for tarot cards sourced from ChatGPT
{
"type": "object",
"x-stoplight": {
"id": "4254907af0db3"
},
"x-examples": {
"data": {
"majorArcana": [
{
"name": "The Fool",
@manchuwook
manchuwook / character.schema.json
Created March 20, 2023 13:07
character.schema.json
"personalLife": {
"description": "Friends, allies, rivals, enemies, superiors, romantic partners, role models, influence among them all",
"type": "array",
"items": {
"type": "string"
}
},
"portrait": {
"type": "string"
},
@manchuwook
manchuwook / tag.txt
Created May 12, 2023 21:40
Regex for tags
Apologies for the confusion. If you only want to encode `<` and `>` characters that are not part of XML tags, you can modify the regex and the encoding logic. Here's an updated example:
```javascript
const text = "<example>Some text with <tag> and > symbol</example>";
// Regular expression to match '<' or '>' not followed by an XML tag
const regex = /(<(?!\/?[a-zA-Z]+\b)[^>]*>)|([<>])/g;
// Function to encode the matched characters
function encodeNonXmlTags(match, xmlTag) {
@manchuwook
manchuwook / emphasis.txt
Last active June 4, 2023 19:58
A list of phrases to use for your ML vocal training.
She said she loved him
Only she said she loved him.
She only said she loved him.
She said only she loved him.
She said she only loved him.
She said she loved only him.
She said she loved him only.