mirror of
https://github.com/TomHodson/tomhodson.github.com.git
synced 2025-06-26 10:01:18 +02:00
Compare commits
3 Commits
605606ca4c
...
11fb58790b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
11fb58790b | ||
![]() |
a04970fb12 | ||
![]() |
b60e85ab57 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
_site
|
_site
|
||||||
|
.vscode/
|
||||||
.sass-cache
|
.sass-cache
|
||||||
.jekyll-cache
|
.jekyll-cache
|
||||||
.jekyll-metadata
|
.jekyll-metadata
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
New blog post: {{ page.title }} - {{page.excerpt}}
|
New blog post: {{ page.title }} - {{page.excerpt}}
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
<div class="e-bridgy-mastodon-content hidden">
|
<div class="e-bridgy-mastodon-content hidden">
|
||||||
{{ page.social_text | default_mastodon_text }}
|
{{ page.social_text | default: default_mastodon_text }}
|
||||||
<img src = "{{ page.social_image }}"
|
<img src = "{{ page.social_image }}"
|
||||||
class = "u-featured"
|
class = "u-featured"
|
||||||
alt="{{page.alt | xml_escape }}">
|
alt="{{page.alt | xml_escape }}">
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
title: A new day, a new domain.
|
title: A new day, a new domain.
|
||||||
layout: post
|
layout: post
|
||||||
excerpt: I just registered thod.dev and bought my first VPS.
|
excerpt: I just registered thod.dev and bought my first VPS.
|
||||||
draft: true
|
|
||||||
|
|
||||||
assets: /assets/blog/a-new-day-a-new-domain
|
assets: /assets/blog/a-new-day-a-new-domain
|
||||||
thumbnail: /assets/blog/a-new-day-a-new-domain/thumbnail.svg
|
thumbnail: /assets/blog/a-new-day-a-new-domain/thumbnail.svg
|
||||||
@ -13,20 +12,115 @@ image_class: invertable
|
|||||||
|
|
||||||
I bought [thod.dev](https://thod.dev) a while back because I wanted a slightly shorter domain to play with than [the one you're at](https://thomashodson.com). In light of what's happening in the US I'm also thinking about starting to get onto the self hosting train. These are my baby steps in that direction.
|
I bought [thod.dev](https://thod.dev) a while back because I wanted a slightly shorter domain to play with than [the one you're at](https://thomashodson.com). In light of what's happening in the US I'm also thinking about starting to get onto the self hosting train. These are my baby steps in that direction.
|
||||||
|
|
||||||
After browsing [european-alternatives.eu](https://european-alternatives.eu/) and reddit a bit I settling on a €4 a month VPS from [netcup](https://www.netcup.com) to start.
|
After browsing [european-alternatives.eu](https://european-alternatives.eu/) and reddit a bit I settled on a €4 a month VPS from [netcup](https://www.netcup.com) to start.
|
||||||
|
|
||||||
I set up the DNS entries in Cloudfare. Eeek not quite an EU alternative but baby steps.
|
I set up the DNS entries in Cloudfare. Not quite an EU alternative but baby steps. Then I Installed caddy. It took me a while to understand how to configure caddy through systemctl but it's [here](https://caddyserver.com/docs/running) if you need it here. Here's my tiny cheatsheet for caddy:
|
||||||
|
|
||||||
Installed nginx and caddy. Took me a while to understand how to configure caddy through systemctl but it's [here](https://caddyserver.com/docs/running).
|
| | |
|
||||||
|
|-------------------------------------------------- |-------------------------------------- |
|
||||||
|
| Change Caddy proxy setup | `code /etc/caddy/Caddyfile` |
|
||||||
|
| Reload caddy (also status, start, stop, restart) | `systemctl reload caddy` |
|
||||||
|
| More details on caddy | `journalctl -xeu caddy.service` |
|
||||||
|
| Who's listening on a port. | `lsof -i :80` |
|
||||||
|
| See live access logs | `tail -f /var/log/caddy/access.log ` |
|
||||||
|
| See process logs | `tail -f /var/log/caddy/process.log` |
|
||||||
|
| Start/stop a service at boot | `systemctl enable [service]` |
|
||||||
|
|
||||||
<figure style="width: 50%">
|
My caddyfile is a series of entries like this, they just direct subdomains to internal docker images or servers. Note that it's much easier to setup subdomains i.e `git.thod.dev` than it is to do something like `thod.dev/git/*`.
|
||||||
<img src="{{ page.assets }}/thumbnail.png">
|
|
||||||
|
```caddy
|
||||||
|
git.thod.dev {
|
||||||
|
import logging
|
||||||
|
reverse_proxy localhost:3000
|
||||||
|
}
|
||||||
|
|
||||||
|
music.thod.dev {
|
||||||
|
import logging
|
||||||
|
reverse_proxy localhost:4533
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Interesting side note: Caddy handles getting TLS certs and https fr you pretty well! The one slightly unexpected side effect of this is that the moment you get a cert issued (which caddy does automatically) for a subdomain, that will become a matter of public record. There are many many bots configured to automatically start sniffing around for vulnerabilities on your server, here's a snippet of some requests I got within minutes of setting up a new subdomain:
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /@vite/env HTTP/1.1
|
||||||
|
GET /actuator/env HTTP/1.1
|
||||||
|
GET /server HTTP/1.1
|
||||||
|
GET /.vscode/sftp.json HTTP/1.1
|
||||||
|
GET /about HTTP/1.1
|
||||||
|
GET /debug/default/view?panel=config HTTP/1.1
|
||||||
|
GET /v2/_catalog HTTP/1.1
|
||||||
|
GET /ecp/Current/exporttool/microsoft.exchange.ediscovery.exporttool.application HTTP/1.1
|
||||||
|
GET /server-status HTTP/1.1
|
||||||
|
GET /login.action HTTP/1.1
|
||||||
|
GET /_all_dbs HTTP/1.1
|
||||||
|
GET /.DS_Store HTTP/1.1
|
||||||
|
GET /.env HTTP/1.1
|
||||||
|
GET /.git/config HTTP/1.1
|
||||||
|
GET /s/3313e22343e28363e2838313/_/;/META-INF/maven/com.atlassian.jira/jira-webapp-dist/pom.properties HTTP/1.1
|
||||||
|
GET /config.json HTTP/1.1
|
||||||
|
GET /telescope/requests HTTP/1.1
|
||||||
|
GET /info.php HTTP/1.1
|
||||||
|
GET /?rest_route=/wp/v2/users/ HTTP/1.1
|
||||||
|
```
|
||||||
|
|
||||||
|
So far I don't have any data/passwords/private keys/etc on this server that I would particularly mind losing or having stolen. Before changing that I think I'll need to do a thorough security review of this box.
|
||||||
|
|
||||||
|
## Experiments so far:
|
||||||
|
|
||||||
|
### Mirror of this site @ [thod.dev](https://thod.dev)
|
||||||
|
|
||||||
|
This is just a test really, I doubt I'll ever fully move from `thomashodson.com` fully to `thod.dev` but maybe one day!
|
||||||
|
|
||||||
|
### Miniflux @ miniflux.thod.dev
|
||||||
|
|
||||||
|
I still need to setup some kind of action to rebuild this mirror.
|
||||||
|
|
||||||
|
For a few years now I've paid for [theoldreader](https://theoldreader.com/) as an rss reader but lately I wanted some kind of API to access my lists of read and unread posts and couldn't really find it from theoldreader, so I'm starting to switch over to a self hosted miniflux, so far so good!
|
||||||
|
|
||||||
|
### Gitea @ [git.thod.dev](https://git.thod.dev)
|
||||||
|
|
||||||
|
I've put up a gitea instance and mirrored a couple repos from github. Haven't quite decided how to use this yet!
|
||||||
|
|
||||||
|
### Navidrome @ music.thod.dev
|
||||||
|
|
||||||
|
I've uploaded various music that I have locally from bandcamp and such to a navidrome instance.
|
||||||
|
|
||||||
|
### Tiny Webservers
|
||||||
|
|
||||||
|
Since I have this server I seems like a good time to play with so more dynamic stuff. My first foray into that is a tiny rust webserver hosted at [api.thod.dev/tiny_servers/single_threaded](https://api.thod.dev/tiny_servers/single_threaded). It just returns a json response telling you how many times this endpoint has been hit since the last time I rebooted it!
|
||||||
|
|
||||||
|
<figure id="hit-counter">
|
||||||
|
<span>??</span>
|
||||||
|
<figcaption>
|
||||||
|
hits since last reboot.
|
||||||
|
</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
I also put a gitea instance at [git.thod.dev](https://git.thod.dev) to test that out.
|
<style>
|
||||||
|
#hit-counter figcaption {
|
||||||
|
margin-left: 0.5em;
|
||||||
|
text-align: left;
|
||||||
|
width: 6em;
|
||||||
|
}
|
||||||
|
|
||||||
<figure style="width: 50%">
|
#hit-counter {
|
||||||
<img src="{{ page.assets }}/gitea.png">
|
display: flex;
|
||||||
</figure>
|
justify-content: center;
|
||||||
|
align-items: last baseline;
|
||||||
|
}
|
||||||
|
|
||||||
I haven't quite decided what I'll use this for yet. Various experiments that require more than just the static file hosting I've been using github pages.
|
#hit-counter span {
|
||||||
|
font-family: Impact;
|
||||||
|
font-size: 5em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script type="module">
|
||||||
|
let counter = document.querySelector("#hit-counter span");
|
||||||
|
counter.innerHTML = await fetch("https://api.thod.dev/tiny_servers/single_threaded")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(json => json.hits);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
Try it out with `curl -vvv https://api.thod.dev/tiny_servers/single_threaded` and [the webserver code is here](https://github.com/TomHodson/tomhodson.github.com/blob/main/experiments/tiny_webservers/src/bin/single_threaded.rs).
|
Binary file not shown.
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 6.2 KiB |
77
assets/blog/a-new-day-a-new-domain/thumbnail.svg
Normal file
77
assets/blog/a-new-day-a-new-domain/thumbnail.svg
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="250"
|
||||||
|
height="250"
|
||||||
|
viewBox="0 0 66.145832 66.145833"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.2.2 (b0a84865, 2022-12-01)"
|
||||||
|
sodipodi:docname="thumbnail.svg"
|
||||||
|
inkscape:export-filename="thumbnail.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.58578193"
|
||||||
|
inkscape:cx="203.14727"
|
||||||
|
inkscape:cy="133.15535"
|
||||||
|
inkscape:window-width="1309"
|
||||||
|
inkscape:window-height="638"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="35"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<rect
|
||||||
|
x="34.386857"
|
||||||
|
y="105.45303"
|
||||||
|
width="214.38501"
|
||||||
|
height="38.162215"
|
||||||
|
id="rect236" />
|
||||||
|
<rect
|
||||||
|
x="34.386856"
|
||||||
|
y="105.45303"
|
||||||
|
width="175.37297"
|
||||||
|
height="34.386856"
|
||||||
|
id="rect236-5" />
|
||||||
|
<rect
|
||||||
|
x="34.386856"
|
||||||
|
y="105.45303"
|
||||||
|
width="277.30765"
|
||||||
|
height="48.229837"
|
||||||
|
id="rect236-7" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
transform="matrix(0.31171781,-0.31171781,0.31171781,0.31171781,-34.211824,26.33593)"
|
||||||
|
id="text234-4"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:26.7632px;line-height:1.15;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk, @wght=700';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-variation-settings:'wght' 700;white-space:pre;shape-inside:url(#rect236-5);display:inline;fill:#000000;fill-opacity:1;stroke-width:2.592;stroke-miterlimit:4.9"><tspan
|
||||||
|
x="34.386719"
|
||||||
|
y="128.09907"
|
||||||
|
id="tspan780"><tspan
|
||||||
|
style="fill:#9955ff"
|
||||||
|
id="tspan776">THOD</tspan>.<tspan
|
||||||
|
style="fill:#ff2a7f"
|
||||||
|
id="tspan778">DEV</tspan></tspan></text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
@ -9,6 +9,10 @@ mathjax: false
|
|||||||
|
|
||||||
# Project Ideas
|
# Project Ideas
|
||||||
|
|
||||||
|
* add bot blocking https://blog.cloudflare.com/declaring-your-aindependence-block-ai-bots-scrapers-and-crawlers-with-a-single-click/
|
||||||
|
|
||||||
|
* Add stylised toon shading to the outline renderer. Ie take the dot product between the light direction and the normal direction, soft threshold it and then use either a shadow colour or a highlight colour.
|
||||||
|
|
||||||
* Take on board some ideas from https://plainvanillaweb.com/index.html
|
* Take on board some ideas from https://plainvanillaweb.com/index.html
|
||||||
|
|
||||||
* get https://www.feather.art/ and try out the line rendering for nice 3D annotations
|
* get https://www.feather.art/ and try out the line rendering for nice 3D annotations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user