Reaves.dev

v0.1.0

built using

Phoenix v1.7.17

Showcase

https://gitlab.com/reavessm/distrust

DisTRUST

Distributed system Test Runner Using Scalable Technology (DisTRUST) is a framework for creating test cases and attempting to satisfy them.

Description

This project creates a Kubernetes Operator to aid in the process of testing students in a Distributed Systems course. Professors will create multiple test cases, and students will provide their container images to be tested against those cases. The reconciler loop will run the professor’s input on the student’s containers, and verify the output.

Examples

---
apiVersion: distrust.reaves.dev/v1alpha1
kind: TestCase
metadata:
  name: basic
  namespace: homelab-distrust
  labels:
    dev.reaves.distrust/suite: basic
spec:
  case-id: basic
  client-inputs:
    - name: single
      inputs:
        - put foo bar
        - get foo
  server-outputs:
    - outputs:
        - bar
---
apiVersion: distrust.reaves.dev/v1alpha1
kind: Submission
metadata:
  name: basic
  namespace: homelab-distrust
  labels:
    dev.reaves.distrust/suite: basic
spec:
  client-image: 'quay.io/reavessm/distrust:client'
  server-image: 'quay.io/reavessm/distrust:server'
  username: 'sreaves31'
  server-port: 8080

See more examples in the examples/demo folder

Demo

https://youtu.be/R4Ltbgr6TgA

Getting Started

Prerequisites

  • go version v1.20.0+
  • docker version 17.03+.
  • kubectl version v1.11.3+.
  • Access to a Kubernetes v1.11.3+ cluster.

To Deploy on the cluster

Build and push your image to the location specified by IMG:

make docker-build docker-push IMG=<some-registry>/distrust:tag

NOTE: This image ought to be published in the personal registry you specified. And it is required to have access to pull the image from the working environment. Make sure you have the proper permission to the registry if the above commands don’t work.

Install the CRDs into the cluster:

make install

Deploy the Manager to the cluster with the image specified by IMG:

make deploy IMG=<some-registry>/distrust:tag

NOTE: If you encounter RBAC errors, you may need to grant yourself cluster-admin privileges or be logged in as admin.

Create instances of your solution You can apply the samples (examples) from the config/sample:

kubectl apply -k config/samples/

NOTE: Ensure that the samples has default values to test it out.

To Uninstall

Delete the instances (CRs) from the cluster:

kubectl delete -k config/samples/

Delete the APIs(CRDs) from the cluster:

make uninstall

UnDeploy the controller from the cluster:

make undeploy

Contributing

// TODO(user): Add detailed information on how you would like others to contribute to this project

NOTE: Run make help for more information on all potential make targets

More information can be found via the Kubebuilder Documentation

Authors

Stephen Reaves

License

Copyright 2024.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

https://gitlab.com/reavessm/temple

Temple

Temple generates an html page based on sermon metadata scraped from a bulletin pdf

Example

Create a file called copy-paste.txt that looks like this:

Preaching of the Word Rev. Tyler Dirks

Power Perfected Through Weakness

Judges 16:23-31
I. Inclusion Of Undesirable Characters

II. Inescapable Weakness

III. Indomitable

- 4 -

- Reflection Questions -
1) How is perfection achieved? What’s the formula?
2) What’s your M.O. when it comes to dealing with undesirable characters?
3) How do you feel about weakness?
4) How do you feel about Paul’s fomenting use of the word ‘skubala’ in Philippians 3?
5) What is the most indomitable event in human history?
6) Who is the most indomitable figure in existence?

Then create a file that holds the dropbox audio url called url.txt:

https://www.dropbox.com/scl/fi/p1wz502r9bi189wsgnimj/ECPC-Worship-20231001.mp3?rlkey=mkpev3dtwhhw07l9dtfdt6ifa&dl=0

Then you can run mix temple.run and you’ll see:

<p style="text-align: center;"><strong>Sunday Worship</strong></p>
<p style="text-align: center;"><strong>October 1st, 2023</strong></p>
&nbsp;
<p style="text-align: center;"><strong>“Power Perfected Through Weakness”</strong></p>
<p style="text-align: center;">Judges 16:23-31</p>
<p style="text-align: center;">Rev. Tyler Dirks</p>
&nbsp;

<a href="https://dl.dropbox.com/scl/fi/p1wz502r9bi189wsgnimj/ECPC-Worship-20231001.mp3?rlkey=mkpev3dtwhhw07l9dtfdt6ifa&amp;dl=0
">Sermon Audio</a>

&nbsp;

<strong>Sermon Outline:</strong>
<ol>
  
 	<li>Inclusion Of Undesirable Characters</li>
  
 	<li>Inescapable Weakness</li>
  
 	<li>Indomitable</li>
  
</ol>
<strong>Reflection Questions:</strong>
<ol>
  
 	<li>How is perfection achieved? What’s the formula?</li>
  
 	<li>What’s your M.O. when it comes to dealing with undesirable characters?</li>
  
 	<li>How do you feel about weakness?</li>
  
 	<li>How do you feel about Paul’s fomenting use of the word ‘skubala’ in Philippians 3?</li>
  
 	<li>What is the most indomitable event in human history?</li>
  
 	<li>Who is the most indomitable figure in existence?</li>
  
</ol>
https://gitlab.com/reavessm/pc

Pc

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

  • Official website: https://www.phoenixframework.org/
  • Guides: https://hexdocs.pm/phoenix/overview.html
  • Docs: https://hexdocs.pm/phoenix
  • Forum: https://elixirforum.com/c/phoenix-forum
  • Source: https://github.com/phoenixframework/phoenix
https://gitlab.com/reavessm/grdr-beam

GrdrBeam

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

  • Official website: https://www.phoenixframework.org/
  • Guides: https://hexdocs.pm/phoenix/overview.html
  • Docs: https://hexdocs.pm/phoenix
  • Forum: https://elixirforum.com/c/phoenix-forum
  • Source: https://github.com/phoenixframework/phoenix

Demo

https://gitlab.com/reavessm/grdr

GRDR

grdr is a tool to generate blogs and slideshows from markdown files

Built with cargo-make

GitLab last commit

Gitlab pipeline status

Up and Running

In order to get up and running, clone this repo and run cargo make rebuild. This will require cargo make. If you’re a cool kid and want to run this with podman, you can try cargo make kube. This may require aardvark-dns to be installed on your system, but I’m not quite sure why.

Front Matter

Metadata can be stored alongside the content of the file using a front matter system. For example:

title = README
date = 3333-12-31
author = Stephen M. Reaves
author_twitter = rpscln
author_twitch = rapscallionreaves
author_mastodon = rapscallionreaves
tags = ["grdr"]
description = Readme to understand GRDR
slides = false
rivets = []

Everything above should be at the top of the file and a --- is used as a separator. Everything about the --- is considered front matter. This KV system is used to generate content. For example, description is what shows up when listing all the posts, author_mastodon generates a link to a mastodon profile, tags lets posts be grouped together, and rivets allow us to extra parsing outside the bounds of regular markdown.

Rivets

The real meat and potatoes of this tool is the rivets system. Rivets are dynamic parsers to augment normal markdown.

Rivets need to be enabled in the front matter, and inside the content. You can think of the front matter being an on/off switch for certain rivets, and the rivet tags inside the content dictate which parts should be rendered through that particular rivet. Let’s look at an example.

Katex

The first thing people tend to want to do when using markdown is add latex. GRDR handles this with the katex rivet. To use the katex rivet, make sure the rivet is enabled in the front matter (i.e. rivets = ["katex", "some_other_rivet"]) and surround the latex content with rivet tags. In this case the opening tag will be $katex and the closing tag will be katex$.

So you can do:

$katex
f(\relax{x}) = \int_{-\infty}^\infty f(\xi\,)e^{2 \pi i \xi x} \,d\xi
katex$

And have pretty math functions rendered in the final HTML.

Graphviz

Another thing you can do is generate SVGs from Graphviz. Try enabling the graphviz rivet and adding this to your content:

$graphviz
strict digraph t {
  aa[color=green]
    subgraph v {
      aa[shape=square]
        subgraph vv{a2 -> b2}
      aaa[color=red]
        aaa -> bbb
    }
  aa -> be -> subgraph v { d -> aaa}
  aa -> aaa -> v
}
graphviz$

This will require the graphviz binary on your system.

Slides

GRDR can also present posts as slides. The first thing you need to is set slides = true in the front matter. Then everything between a header (#) and a break (___) will become a single slide. For example, this would be a set of three slides:

# Title

Use the left and right arrow keys to move throughout the slides.

___

## First page

Here is some text

___

## Another page

Here is some more

$graphviz
strict digraph t {
    bgcolor="transparent"
    label="Test Graph"
    fontcolor="white"
    beautify=true

    node[style="filled, rounded, bold" fillcolor="white"]
    edge[color="white" fontcolor="white"]

    aa[color=green]
        subgraph v {
            aa[shape=square]
                subgraph vv{a2 -> b2}
            aaa[color=red]
                aaa -> bbb [label="foo"]
        }
    aa -> be -> subgraph v { d -> aaa}
    aa -> aaa -> v
}
graphviz$

___

Showcase

Putting a git(lab|hub) url in between showcase tags will download the README file and put it in a drop down. For example:

$showcase
https://gitlab.com/reavessm/rea
showcase$

Hide

You can also put long content between hide tags and the content will be hidden behind a drop-down in the final html. You can also put a summary on the same line as the opening tag and that will be displayed when the drop-down is closed, in order to give some hints about what secrets you’re hiding.

$hide Super lots of text
foo
.
.
.
bar
hide$
https://gitlab.com/reavessm/rea

REA

rea is a Reverse-Engineering Api generator

Usage

> rea -h
Usage of rea:
  -f string
        File to read from
  -o string
        File to output to (default "out.go")
  -p string
        Package name of generated file (default "main")
  -s string
        Name of struct to be generated (default "Object")
  -v    Verbose output?

Examples

Basic

curl 'https://www.boredapi.com/api/activity' | rea && cat out.go

Advanced

rea -w 'https://randomuser.me/api/' -s User -p accounts -o user.go && cat user.go

Appending

rea -w https://www.boredapi.com/api/activity -o foo.go -s activity
ocm whoami | rea -o foo.go -s user
cat foo.go

Installation

go install gitlab.com/reavessm/rea/cmd/rea@latest
https://gitlab.com/reavessm/osb

ReavesOS

Personal Linux Distro based on Gentoo

Usage

Building and pushing is done with make. If you want to rebuild everything, simply run sudo make. If you only want to build a specific stage (like stage4), run sudo make stage4. If you want a more specific target, run sudo make stage4-amd64-default-zfs. If you want to see all available containers, run make targets.

Targets

Installable targets are:

all
├── stage0
│   ├── portage
│   └── catalyst
├── stage1
│   └── stage1-amd64-default
├── stage2
│   └── stage2-amd64-default
├── stage3
│   └── stage3-amd64-default
└── stage4
    ├── stage4-amd64-default
    └── stage4-amd64-default-zfs

The default target is ‘all’

https://gitlab.com/reavessm/obi

OBI

OS Build Installer is a tool to install images created from containers directly to your hard disk.

What containers can be installed?

Technically any container, but some won’t boot. You’ll need at least a kernel and a bootloader in the image (and probably an init system). We only support containers built by OS Builder. If you really need a different container, you can try installing an OSB container (like ReavesOS) then reinstalling another container on top of that, but we can’t garauntee any level of success for that scenario.

Usage

Dependencies

Install the dependencies in Fedora by runnings sudo dnf install {gpgme,btrfs-progs,device-mapper}-devel

Make sure podman is running as a service by running sudo systemctl start podman

Run it

You can start the actual command by running sudo go run gitlab.com/reavessm/obi/cmd/tui@latest

https://github.com/reavessm/RCFiles

RCFiles

my .bashrc, .bash_aliases, .vimrc, etc.

https://github.com/reavessm/ClosetPlusPlus

ClosetPlusPlus

Clone the repo

run make

run ./Closet++

follow prompts