dom111.github.io

A selection of tools and scripts I've created.

Tools

bash-colours
A tool for generating ANSI styles.
bash-ps1
A tool for styling your bash prompt string.
bash-todo
A simple TODO app for bash that was built based on a question asked on /r/bash.
image-to-ansi
A tool to convert an image to a series of ANSI escape sequences.
grep-colors
A tool to help your build a GREP_COLORS string, styling the output from grep.
webdav-js
A WebDAV client written in browser-based JavaScript. To be used as a bookmarklet, or inline script directly in your Apache directory listing header file.
gut
A tool in the loosest sense of the word. Ever mistyped git as gut? I have and at a really annoying time, so I made this, which encouraged me to make...
out-of-a-hat
Doing a World Cup sweepstake? Want to have a random team without knowing it right away? Don't want to give your friend's and family's email addresses, phone numbers, social IDs out? This is a simple script that produces a unique URL and utilises the browser's Share API to allow you to send out the assigned thing without knowing what it is, or compromising security.
gif-to-ansi
A tool to convert an animated GIF to a simple shell script that utilises ANSI escape sequences.

Scripts

terminal-preview
A collection of JavaScript and CSS that turns an HTML element into an ANSI-escape styling supporting terminal emulator. Used in some of the above tools.

Fun

js-shithead
As an exercise in building a Deck object in JavaScript, I built this mostly functional game of shithead (palace), you can play against a simplistic AI and I've tried to build it so that the many differing options of shithead can be implemented.
flow-free-clone
Originally an exercise in learning CSS custom properties, a simple clone of the game Flow. I'd like to make a generator, but I think first I need to write a solver and then I need to realise that brute force solving will probably suck and read some books about how to do it properly.
civ-clone
Quite some time ago I thought it'd be fun to write AI for Civ. I enjoy Civ 5 and the original Civilization most, so I thought improving the AI for the original would be a good place to start. Unfortunately changing the AI in the source felt like it would be a bit tricky, so I instead thought I'd make a 'bare bones' clone of the original game to write an AI for. I decided that it should be 'modular' so that it would be easier to write AI for certain parts and improve it over time. That ended up being a bit of a trickeier challenge than I'd anticipated (because, of course it was!). I've got the clone into a place where you can just about play, but because of the mechanism I chose to transfer data back and forth, it's slow and slows down more the longer you play it. I need to work on this, but I did made an AI.