From fb94231243beaf10c74e5de0638585c5ea701965 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 6 Dec 2020 16:18:21 +0000 Subject: [PATCH] Add some more project pages --- content/projects/date-group.md | 16 ++++++++++++++++ content/projects/docker-static-server.md | 20 ++++++++++++++++++++ content/projects/git-mirror.md | 15 +++++++++++++++ content/projects/grafana-apprise-adapter.md | 16 ++++++++++++++++ content/projects/lantern.md | 17 +++++++++++++++++ content/projects/mdcal.md | 11 +++++++++++ content/projects/notes.md | 15 +++++++++++++++ 7 files changed, 110 insertions(+) create mode 100644 content/projects/date-group.md create mode 100644 content/projects/docker-static-server.md create mode 100644 content/projects/git-mirror.md create mode 100644 content/projects/grafana-apprise-adapter.md create mode 100644 content/projects/lantern.md create mode 100644 content/projects/mdcal.md create mode 100644 content/projects/notes.md diff --git a/content/projects/date-group.md b/content/projects/date-group.md new file mode 100644 index 0000000..60efc48 --- /dev/null +++ b/content/projects/date-group.md @@ -0,0 +1,16 @@ +--- +title: Date Group +repo: RealOrangeOne/date-group +subtitle: Group files by date +--- + +Over the years, I've taken a lot of photos on my phone, and it's hard to keep them organized properly. Large directories of files don't play nicely with [Nextcloud](https://nextcloud.com/), my storage of choice. + +`date-group` is my tool to solve this. Give it a directory of files, and it'll group them into directories by year and month. It gets the date in a couple ways: + +1. Image EXIF data +2. Parse the filename + +{{% repobutton %}} + +I [originally wrote the tool in Python](https://github.com/RealOrangeOne/date-group-py/), but ported it to Rust for easier deployment, quite a performance improvement, and of course a safer implementation. diff --git a/content/projects/docker-static-server.md b/content/projects/docker-static-server.md new file mode 100644 index 0000000..9446408 --- /dev/null +++ b/content/projects/docker-static-server.md @@ -0,0 +1,20 @@ +--- +title: Docker Static Server +repo: RealOrangeOne/docker-static-server +subtitle: Static file server designed for serving files not websites +--- + +Sometimes, you just need a simple container to host some static files. Whether that be files for download, images to show, or a directory of files. + +## Why not just use Nginx? + +If you're not really bothered, the default [`nginx`](https://hub.docker.com/_/nginx) container will work just fine for you, however this container has a few modifications which make it more suited to serving static files: + +- Use environment variables for customization +- Healthcheck endpoint +- GZIP all files +- Use `X-Forwarded-For` header when getting client IP + +{{% repobutton %}} + +Previously I had created [`tstatic`](https://github.com/RealOrangeOne/tstatic) to do this, but Nginx is far better as a server than node. The less node in my stack, the better! diff --git a/content/projects/git-mirror.md b/content/projects/git-mirror.md new file mode 100644 index 0000000..0449501 --- /dev/null +++ b/content/projects/git-mirror.md @@ -0,0 +1,15 @@ +--- +title: Git Mirror +repo: RealOrangeOne/git-mirror +subtitle: Provider-agnostic mirroring of git repositories +--- + +Recently, I started moving most of my archived projects from GitHub onto my own Git server. Unfortunately, the self hosted offerings aren't perfect for mirroring. [Gitea](https://gitea.io/) supports mirroring repositories _into_ itself, but not pushing (work is [planned](https://github.com/go-gitea/gitea/issues/7609)). [GitLab](https://gitlab.com/) supports pushing repositories _to_ an upstream, but not mirroring into itself unless you pay them a lot of money. + +This meant if I wanted the primary for my repositories to be on my server, but still be visible on GitHub, I couldn't. That is, unless I wrote something myself. + +`git-mirror` is a small scheduler which simply pushes changes from repository to another. Simply specify an interval, a source repository and a destination, and it'll handle the rest. It only runs on a schedule rather than detecting automatically, but this makes it platform agnostic. + +{{% repobutton %}} + +Since writing `git-mirror` I've moved from Gitea to GitLab, which has native push support. I do plan to migrate back to Gitea just as soon as they have push mirror support. Or sooner, we'll see. diff --git a/content/projects/grafana-apprise-adapter.md b/content/projects/grafana-apprise-adapter.md new file mode 100644 index 0000000..0672af5 --- /dev/null +++ b/content/projects/grafana-apprise-adapter.md @@ -0,0 +1,16 @@ +--- +title: Grafana Apprise Adapter +repo: RealOrangeOne/grafana-apprise-adapter +subtitle: Receive Grafana alerts from many more platforms +--- + +[Grafana](https://grafana.com/) is a great application for monitoring. With a plethora of data sources allowing for analysing and cross-referencing several metrics. Unfortunately, it doesn't support much in terms of notifications. + + +[Apprise](https://github.com/caronc/apprise) is a great library for creating generic integrations between applications and messaging services for receiving notifications. The only downside is that it's written in Python, which makes integrating it with Grafana's Go codebase rather difficult. + +`grafana-apprise-adapter` is a small web server which converts messages from Grafana's webhook notifier into a format the [Apprise web API](https://github.com/caronc/apprise-api/) can consume. Thus allowing for many more notification targets. + +{{% repobutton %}} + +It's written in Rust, both so it can have low resource overhead, but also for safety, ensuring that the adapter itself will have few issues resulting in messages not going through. diff --git a/content/projects/lantern.md b/content/projects/lantern.md new file mode 100644 index 0000000..4a316cf --- /dev/null +++ b/content/projects/lantern.md @@ -0,0 +1,17 @@ +--- +title: Lantern +repo: RealOrangeOne/lantern +subtitle: Write a web server in almost any language. +--- + +Lantern is a generic web server which wraps any application and allows it to respond to HTTP requests. The request body and headers are passed to `stdin` as JSON, and anything sent to `stdout` is returned to the client. + +Is this useful? Not really. + +Isn't this basically just [CGI](https://www.geeksforgeeks.org/common-gateway-interface-cgi/)? Yeah kinda. + +Should this be used for production deployments? Definitely not! + +It's just a fun experiment with [`sanic`](https://sanic.readthedocs.io/en/latest/) and async programming in its early days. + +{{% repobutton %}} diff --git a/content/projects/mdcal.md b/content/projects/mdcal.md new file mode 100644 index 0000000..df8cbb8 --- /dev/null +++ b/content/projects/mdcal.md @@ -0,0 +1,11 @@ +--- +title: MDCal +repo: RealOrangeOne/mdcal +subtitle: Static site generator for calendars +--- + +MDCal is a project designed to make creating calendar feeds simpler. Static site generators are great, but sometimes you need a calendar rather than a website. + +{{% repobutton %}} + +Demo: https://mdcal.netlify.app/ diff --git a/content/projects/notes.md b/content/projects/notes.md new file mode 100644 index 0000000..ca69a23 --- /dev/null +++ b/content/projects/notes.md @@ -0,0 +1,15 @@ +--- +title: Notes +repo: RealOrangeOne/notes +subtitle: Notes and snippets and things +--- + +As someone who spends a lot of time at a computer, you pick up certain commands and tricks which make life easier. Unfortunately, the human brain can only remember so much. And shell reverse search can't remember everything. + +To store things like this, I created a "notes" site, powered by [Gatsby](https://www.gatsbyjs.com/) and [`gatsby-theme-code-notes`](https://github.com/mrmartineau/gatsby-theme-code-notes/). I don't really like my static sites to have a massive react frontend, but this theme just looks so nicely that it's worth the [initial pain](https://github.com/mrmartineau/gatsby-theme-code-notes/issues/65). + +There's not a huge amount there yet, but it's growing. + +{{% repobutton %}} + +Site: https://notes.theorangeone.net/