Dave's Code Repositories
New and in progress! If you’ve come here expecting to find a particular repo (particularly via a README on GitHub), please note that I’ve just started converting and posting repos here.
Repos so far:
-
RepoRat - A static website generator for Git repos written in Ruby.
-
zstd-browse2 - Turns the Zig standard library into a browseable HTML mini-site with a split column source/documentation appearance.
-
RetroV - A tiny browser-native Virtual DOM rendering library.
-
Meow5 - A highly conCATenative (sorry) Forth-inspired programming language experiment in NASM assembly.
-
mez - A Zig program to help me debug the ELF output of Meow5 and possibly other experiments.
-
-
PFTGU NASM - NASM ports of assembly language exercises from "Programming from the Ground Up"
-
Rat-Tools - Tools I use to build and maintain this website.
-
VViki - An AsciiDoc-flavored wiki plugin for Vim
-
chklnks.rb - Website link crawler and checker written in Ruby
-
RubyLit - A literate programming system in 25 lines; the README is a program!
-
Hiss - An HTML choose-your-own adventure game creator.
-
Snobol4th - A Forth written in Snobol4
-
pumpkin.sh - A Halloween pumpkin for your terminal.
About
This is where I publish repos to be viewable, but where do I host them for actual pushing and pulling? That’s done on a tiny headless server on my home network. (Search that page for "bare repo". It’s incredibly easy to set up once you know what you’re doing!)
My RepoRat program is complete. So now I just need to publish
the repos here. Mostly that’s a matter of converting the READMEs
to "rat-flavored" Markdown (which is actually just the discount
tool’s faithful interpretation of old skool markdown).
If there’s a repo you’d like to see, I’d be happy to move it up the queue. Otherwise, they’ll be going up in pretty random order.
Self-host Checklist
To "move" my repos from GitHub to my home server and to this website just requires these steps:
Clone it (if not already) to my local ~/proj/
directory:
git clone https://github.com/ratfactor/FOO ~/proj/
Next, I’ll make it host-able on my home network for access by any number of computers and publish it to my website.
NOTE The whole process described in the sections below is now completely automated using a script in my "Rat Tools" collection called ratmyrepo.rb!
(After the Nth time doing it by hand and messing something up each time, I knew I needed to turn it into a script!)
Make 'bare' repo for syncing
(This part is optional and only needed if I want to work on the repo on multiple computers and keep them in sync. Otherwise, I just SSH into my home server and work on it there.)
Clone a 'bare' repo to my local ~/repos/
directory:
git clone --bare ~/proj/FOO ~/repos/FOO.git
Set the remote "origin" url
to the bare repo’s path:
vim ~/proj/FOO/.git/config
... [remote "origin"] url = /home/dave/repos/FOO.git
Test local repo communication (if desired):
cd proj/FOO <make some change> git add . git commit git push git pull
Working on the repo from other computers on my home network is as easy as:
git clone phobos:repos/FOO.git
(The .git/config
file in that cloned repo will then contain
url = phobos:repos/FOO.git
and be ready to use that as the
remote "origin".)
Publish to my website
The last part of putting the repo "out there" for others to see and clone is to publish it to ratfactor.com. I use my RepoRat tool for this:
cd proj/FOO reporat
rat pub # <----- my website tool, rsyncs the content to my web server
Finally, I double-check ratfactor.com/repos/FOO/ and update the repo list on this page (see above!) with the link to the new repo.