loads of cleanup

This commit is contained in:
Tom 2023-10-13 15:50:00 +02:00
parent 43a1a23ecb
commit 673442652d
34 changed files with 103 additions and 53 deletions

View File

@ -46,6 +46,7 @@ See: https://developers.google.com/search/docs/advanced/mobile/google-discover?h
<link rel="stylesheet" href="/assets/css/styles.css"> <link rel="stylesheet" href="/assets/css/styles.css">
<script src="/assets/js/index.js"></script> <script src="/assets/js/index.js"></script>
{% if page.mathjax %}
<script> <script>
MathJax = { MathJax = {
tex: { tex: {
@ -57,6 +58,7 @@ See: https://developers.google.com/search/docs/advanced/mobile/google-discover?h
}; };
</script> </script>
<script src="/assets/mathjax/tex-mml-svg.js" id="MathJax-script" async></script> <script src="/assets/mathjax/tex-mml-svg.js" id="MathJax-script" async></script>
{% endif %}
<!-- RSS feed --> <!-- RSS feed -->
{% feed_meta %} {% feed_meta %}

View File

@ -1,12 +1,12 @@
--- ---
title: Making a custom bootscreen for your TS100 Soldering Iron title: Making a custom bootscreen for your TS100 Soldering Iron
layout: post layout: post
excerpt: |
It's a right of passage to add a custom bootscreen to your TS100 soldering iron but it took me a while to figure out how to generate a 1bit per pixel bitmap image.
image: /assets/blog/TS100/real.jpeg image: /assets/blog/TS100/real.jpeg
alt: An image of a TS100 soldering iron showing a custom bootscreen that says 'solder boy'. alt: An image of a TS100 soldering iron showing a custom bootscreen that says 'solder boy'.
--- ---
There are a bunch of [posts](https://blog.dbrgn.ch/2017/9/5/creating-custom-ts100-logo-with-gimp/) online about how to add a custom bootscreen to a TS100 soldering iron. These things are great, if you get a little USB-C to jack adapter you can run them off a powerbank and they're tiny so you can keep them with you wherever you go. Which of course you should. There are a bunch of [posts](https://blog.dbrgn.ch/2017/9/5/creating-custom-ts100-logo-with-gimp/) online about how to add a custom bootscreen to a TS100 soldering iron. These things are great, if you get a little USB-C to jack adapter you can run them off a powerbank and they're tiny so you can keep them with you wherever you go. Which of course you should.
I did have some trouble getting the image into the write format though, after messing around a little I settled on this command using ImageMagick: I did have some trouble getting the image into the write format though, after messing around a little I settled on this command using ImageMagick:

View File

@ -1,6 +1,7 @@
--- ---
title: Building Overleaf projects locally title: Building Overleaf projects locally
excerpt: I wanted to work on an overleaf project while on the train without reliable internet. excerpt: I wanted to work on an overleaf project while on the train without reliable internet.
thumbnail: /assets/blog/overleaf/logo.svg
date: 2022-02-02 date: 2022-02-02
layout: post layout: post
image: image:

View File

@ -1,5 +1,6 @@
--- ---
title: My Jupyter and Conda setup title: My Jupyter and <s>Conda</s> Mamba setup
thumbnail: /assets/blog/mamba/logos.png
date: 2022-02-02 date: 2022-02-02
layout: post layout: post
--- ---

View File

@ -3,6 +3,7 @@ title: Learning Paths
excerpt: A small tool to visualise dependencies of courses. excerpt: A small tool to visualise dependencies of courses.
layout: post layout: post
image: /assets/images/learning_paths.png image: /assets/images/learning_paths.png
image_class: invertable
alt: A screenshot of a web app that visualises dependencies between courses by linking them with lines. alt: A screenshot of a web app that visualises dependencies between courses by linking them with lines.
--- ---

View File

@ -3,8 +3,11 @@ title: How to Animate Inkscape SVGs with d3
excerpt: In which a simple thing turns out to be surprisingly in-depth! excerpt: In which a simple thing turns out to be surprisingly in-depth!
layout: post layout: post
image: /assets/thesis/intro_chapter/fk_schematic.svg image: /assets/thesis/intro_chapter/fk_schematic.svg
social_image: /assets/social/fk_diagram.png thumbnail: /assets/blog/interactive_svgs/thumbnail.png
social_image: /assets/blog/interactive_svgs/fk_diagram.png
image_class: invertable
alt: A diagram showing showing circles with arrows in them linked by lines that represents a simple physical model of electron spins interacting. alt: A diagram showing showing circles with arrows in them linked by lines that represents a simple physical model of electron spins interacting.
mathjax: true
--- ---
I wanted my thesis to have a nice HTML version in addition to the mandatory-in-my-field latex/PDF version. Having a HTML version also means I can experiment with a bit of interactivity. I've done some of the diagrams in SVG using Inkscape which is a nice tool for this kind of thing. I wanted to add some interactivity as an easter egg to the SVGs in the HTML version. I wanted my thesis to have a nice HTML version in addition to the mandatory-in-my-field latex/PDF version. Having a HTML version also means I can experiment with a bit of interactivity. I've done some of the diagrams in SVG using Inkscape which is a nice tool for this kind of thing. I wanted to add some interactivity as an easter egg to the SVGs in the HTML version.

View File

@ -1,6 +1,9 @@
--- ---
title: Sensor Watch title: Sensor Watch
layout: post layout: post
excerpt: |
I finally got my [Sensor Watch](https://www.oddlyspecificobjects.com/products/sensorwatch/)! It's a replacement logic board for those classic Casio watches you see everywhere.
image: /assets/blog/SensorWatch/watch.svg image: /assets/blog/SensorWatch/watch.svg
social_image: /assets/social/sensor_watch.svg social_image: /assets/social/sensor_watch.svg
alt: A simple vector image of a classic casio watch. alt: A simple vector image of a classic casio watch.

View File

@ -1,6 +1,8 @@
--- ---
title: Using emscripten to simulate an arduino project title: Using emscripten to simulate an arduino project
layout: post layout: post
excerpt: |
The [Sensor Watch](https://www.oddlyspecificobjects.com/products/sensorwatch/) project has this nifty JS simulation for testing the firmware. Here I'll go through a toy example of how it glues together the C firmware code and the JS visualisation.
image: /assets/blog/emscripten_arduino/arduino.svg image: /assets/blog/emscripten_arduino/arduino.svg
social_image: /assets/social/arduino.png social_image: /assets/social/arduino.png
alt: A rendered image of a breadboard with an LED and resistor wired up in series to an arduino. alt: A rendered image of a breadboard with an LED and resistor wired up in series to an arduino.

View File

@ -1,7 +1,8 @@
--- ---
title: Rendering General Relativity title: Rendering General Relativity
layout: post layout: post
image: /assets/images/spinning_earth.gif image: /assets/blog/rendering_general_relativity/spinning_earth.gif
thumbnail: /assets/blog/rendering_general_relativity/thumbnail.gif
alt: A spinning image of the earth but distorted as if it were a black hole. alt: A spinning image of the earth but distorted as if it were a black hole.
permalink: /blog/rendering_general_relativity permalink: /blog/rendering_general_relativity
--- ---

View File

@ -4,6 +4,8 @@ excerpt: We needed some shelves to fit an odd space under a ladder...
layout: post layout: post
image: /assets/blog/shelves/thumb.svg image: /assets/blog/shelves/thumb.svg
social_image: /assets/social/shelves.png social_image: /assets/social/shelves.png
thumbnail: /assets/blog/shelves/thumb.svg
image_class: invertable
alt: A 3D render of some shelves fitting into a triangular space under a ladder. alt: A 3D render of some shelves fitting into a triangular space under a ladder.
assets: /assets/blog/shelves assets: /assets/blog/shelves
head: <script type="module" src="/assets/js/model-viewer.js"></script> head: <script type="module" src="/assets/js/model-viewer.js"></script>

View File

@ -2,7 +2,7 @@
title: Jupyter and Conda setup title: Jupyter and Conda setup
date: 2023-06-20 date: 2023-06-20
layout: post layout: post
image: /assets/blog/mamba/logos.svg image: /assets/blog/mamba/logos.png
social_image: /assets/social/jupyter.png social_image: /assets/social/jupyter.png
alt: The orange, abstract, Jupyter logo and the Mamba logo which is a cute black snake. alt: The orange, abstract, Jupyter logo and the Mamba logo which is a cute black snake.
--- ---

View File

@ -1,7 +1,7 @@
--- ---
title: My first PCB! title: My first PCB!
excerpt: | excerpt: |
I've had a longstanding ambition to get a PCB manufactured but I've always put it off. Lately I had a need for a little adapter board to break out these 1.27mm spaced pins to 2.54mm pins that would fit into a breadboard. Feeling like it was a simple enough board I finally decided to fire up KiCad and give it a go. I've always wanted to get a PCB manufactured but only recently found a something that I actually needed and was simple enough for a first attempt.
layout: post layout: post
commentid: 110810437631337327 commentid: 110810437631337327
image: /assets/blog/PCB/render.png image: /assets/blog/PCB/render.png

View File

@ -1,12 +1,14 @@
--- ---
title: Progress bars and log output in Jupyter notebooks title: Progress bars and log output in Jupyter notebooks
excerpt: excerpt: |
How to get an updatable message printing a tqdm progress bar.
layout: post layout: post
image: /assets/blog/progress_bars/bar.png image: /assets/blog/progress_bars/bar.png
thumbnail: /assets/blog/progress_bars/thumbnail.png thumbnail: /assets/blog/progress_bars/thumbnail.png
image_class: invertable
alt: An image of a nice animated progress bar in a jupyter notebook output cell. alt: An image of a nice animated progress bar in a jupyter notebook output cell.
--- ---
I wanted to have just one updateable line of output that would play nicely with a tqdm progress bar. After playing around with `print(s, end="\r")` I settled on using `Ipython.display` with a handle. The problem with the print approach is that it doesn't work when the output is shorter than the previous line. I wanted to have just one updatable line of output that would play nicely with a tqdm progress bar. After playing around with `print(s, end="\r")` I settled on using `Ipython.display` with a handle. The problem with the print approach is that it doesn't work when the output is shorter than the previous line.
```python ```python
import time import time

View File

@ -1,13 +1,14 @@
--- ---
title: Parsing is fun! title: Parsing is fun!
layout: post
excerpt: | excerpt: |
I came across something I wanted to quickly parse that was too niche to find a ready made parser for. Join me on a quick whip tour of writing a grammar for a PEG parser. I came across something I wanted to quickly parse that was too niche to find a ready made parser for. Join me on a quick whip tour of writing a grammar for a PEG parser.
social_image: /assets/social/parsing.png social_image: /assets/social/parsing.png
image: /assets/social/parsing.png image: /assets/social/parsing.png
thumbnail: /assets/blog/parsing/thumbnail.png thumbnail: /assets/blog/parsing/thumbnail.png
image_class: invertable
alt: A screenshot of some python code showing a PEG grammar definition. alt: A screenshot of some python code showing a PEG grammar definition.
layout: post
commentid: 110746239432993930 commentid: 110746239432993930
--- ---

View File

@ -1,13 +1,16 @@
--- ---
title: A little REPL in every blog post title: A little REPL in every blog post
layout: post layout: post
excerpt: |
A JS library to run python snippets in the browser.
image: /assets/blog/REPL/repl.png image: /assets/blog/REPL/repl.png
thumbnail: /assets/blog/REPL/thumbnail.png thumbnail: /assets/blog/REPL/thumbnail.png
image_class: invertable
alt: A screenshot of a small javascript widget that lets you evaluate python code. It's showing some numpy code and its evaluated output. alt: A screenshot of a small javascript widget that lets you evaluate python code. It's showing some numpy code and its evaluated output.
klipse: True klipse: True
--- ---
On someone else's [excellent personal](http://lambdafunk.com/) site I saw [Klipse](https://github.com/viebel/klipse), a little js library that lets you modify and execute code snippets in blogs. How cute! On this excellent [personal site](http://lambdafunk.com/) I saw [Klipse](https://github.com/viebel/klipse), a little js library that lets you modify and execute code snippets in blogs. How cute!
```klipse-python ```klipse-python
print("Hello, world!") print("Hello, world!")

View File

@ -5,6 +5,7 @@ excerpt: |
layout: post layout: post
hide_image: false # Only use this image for static previews hide_image: false # Only use this image for static previews
image: /assets/blog/toothbrush_shelf/spin.gif image: /assets/blog/toothbrush_shelf/spin.gif
thumbnail: /assets/blog/toothbrush_shelf/thumbnail.gif
alt: A render of a 3D printed shelf sitting above a shaver outlet, it spins slowly. alt: A render of a 3D printed shelf sitting above a shaver outlet, it spins slowly.
head: <script type="module" src="/assets/js/model-viewer.js"></script> head: <script type="module" src="/assets/js/model-viewer.js"></script>
media: | media: |

View File

@ -1,7 +1,9 @@
--- ---
title: "Selfhosting: Miniflux and RSSHub" title: "Selfhosting: Miniflux and RSSHub"
layout: post layout: post
excerpt: Some notes on selfhosting an RSS reader. excerpt: Notes to self on selfhosting an RSS reader.
thumbnail: /assets/blog/miniflux/thumbnail.png
image_class: invertable
--- ---
Like many nerdy, computery types, I like to subscribe to blogs and other content through RSS. RSS is crazy simple, you host a url on a website with a list of posts with titles/URLs/content encoded in XML (I know I know but it only have like 5 tags and is only nested one level deep.) An RSS reader just checks a big list of those URLs every now and then and presents you the latest thing to show up. Like many nerdy, computery types, I like to subscribe to blogs and other content through RSS. RSS is crazy simple, you host a url on a website with a list of posts with titles/URLs/content encoded in XML (I know I know but it only have like 5 tags and is only nested one level deep.) An RSS reader just checks a big list of those URLs every now and then and presents you the latest thing to show up.

View File

@ -1,8 +1,12 @@
--- ---
title: My First Half Marathon! title: My First Half Marathon!
layout: post layout: post
excerpt: |
I ran my first half marathon! Let's look at the data.
image: /assets/blog/running/time_vs_distance.svg image: /assets/blog/running/time_vs_distance.svg
social_image: /assets/blog/running/time_vs_distance.png social_image: /assets/blog/running/time_vs_distance.png
thumbnail: /assets/blog/running/time_vs_distance.svg
image_class: invertable
alt: A scatter graph of run time vs run distance for all my runs on strava. It shows that I mainly run between 5 and 6 min per kilometer, regardless of distance alt: A scatter graph of run time vs run distance for all my runs on strava. It shows that I mainly run between 5 and 6 min per kilometer, regardless of distance
--- ---

View File

@ -2,7 +2,7 @@
title: "Weekend builds: Lasercut stool" title: "Weekend builds: Lasercut stool"
layout: post layout: post
excerpt: | excerpt: |
It's nice when a project can be done in just a few days. This is gonna be a little plant pot stand. This little plant pot stand was a nice weekend project.
image: /assets/blog/weekend_builds_1/stool.jpeg image: /assets/blog/weekend_builds_1/stool.jpeg
thumbnail: /assets/blog/weekend_builds_1/stool_thumbnail.jpeg thumbnail: /assets/blog/weekend_builds_1/stool_thumbnail.jpeg

View File

@ -2,7 +2,7 @@
title: "Maps Maps Maps: Part 2" title: "Maps Maps Maps: Part 2"
layout: post layout: post
excerpt: | excerpt: |
I finish my first laser etched map. In which I make my first laser etched map!
image: /assets/blog/maps/after_sanding.jpeg image: /assets/blog/maps/after_sanding.jpeg
thumbnail: /assets/blog/maps/after_sanding_thumbnail.jpeg thumbnail: /assets/blog/maps/after_sanding_thumbnail.jpeg

View File

@ -1,5 +1,5 @@
$image_size: 8em; $image_size: clamp(5em, 25vw, 8em);
$left_pad: 9em; $left_pad: calc(clamp(5em, 25vw, 8em) + 1em);
h2.blogroll-title { h2.blogroll-title {
a { a {
@ -7,25 +7,37 @@ h2.blogroll-title {
} }
} }
figure.blogroll {
img, svg { hr.blogroll {
margin-bottom: 0; border: 0px solid rgba(128, 128, 128, 0.2);
} width: 66%;
margin-top: 1em;
margin-bottom: 1em;
} }
article.blogroll { article.blogroll {
padding-bottom: 0px;
display: flex;
h2 {margin-top: 0;} h2 {margin-top: 0;
font-size: 1.3em;
section.title { }
padding-left: $left_pad; time {
display: block;
margin-bottom: 0.2em;
font-size: 14px;
} }
summary {padding-left: $left_pad;} figure {
img {
float:left;
margin-right: 1em; margin-right: 1em;
width: $image_size;
height: 100%;
flex-shrink: 0;
margin: 0 1em 0 0;
padding: 0;
}
img {
margin: 0;
max-width: $image_size; max-width: $image_size;
max-height: $image_size; max-height: $image_size;
border-radius: 0.5em; border-radius: 0.5em;
@ -33,12 +45,11 @@ article.blogroll {
} }
@media @media
only screen and (max-width: 500px) only screen and (max-width: $horizontal_breakpoint),
only screen and (max-height: $vertical_breakpoint)
{ {
hr.blogroll {border-width: 1px}
article.blogroll { article.blogroll {
summary {
padding-left: 0;
}
h2 { h2 {
font-size: 1.2em; font-size: 1.2em;
} }

View File

@ -154,7 +154,8 @@ model-viewer {
opacity: .75; opacity: .75;
transition: opacity .5s ease-in-out; transition: opacity .5s ease-in-out;
} }
img.icon { img.icon, img.invertable{
opacity: 1;
filter: invert(1); filter: invert(1);
} }
} }

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/blog/mamba/logos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 841.89 852.62"><defs><mask id="mask" x="174.51" y="91.03" width="1280.35" height="670.56" maskUnits="userSpaceOnUse"><g id="b"><path id="a" d="M1454.86,761.33H174.77V91H1454.86Z" fill="#fff"/></g></mask></defs><title>stickers alt</title><g mask="url(#mask)"><path d="M753,112C662.45,76.7,334.23,63.65,333.68,259.49,237.92,320.8,174.51,420.79,174.51,527.67c0,129.22,104.74,233.91,234,233.91s234-104.74,234-233.91A233.93,233.93,0,0,0,491.82,309c-16.94-6.55-53.74-18.1-83.13-15.62-41.93,26.66-93.06,81.47-117.24,136.06,35.94-43.13,92.12-62,141.88-53.91A154.17,154.17,0,0,1,562.54,527.63c0,85.15-69.31,154.12-154.46,154.12a153.66,153.66,0,0,1-117.24-54c-41.5-48.86-52.2-101.83-43.64-153.6C276.77,292.65,492,189.4,652,149.74c-52.2,27.64-146.33,73-212.22,122.5C631.9,346.43,663,184.44,753,112Z" fill="#47a141"/></g></svg>

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -2,21 +2,26 @@
title: Blog title: Blog
layout: default layout: default
permalink: /blog-alt/ permalink: /blog-alt/
head: <script type="module" src="/assets/js/model-viewer.js"></script> mathjax: false
--- ---
{% for post in site.posts %} {% for post in site.posts %}
<article class="h-entry blogroll"> <article class="h-entry blogroll">
<figure>
<img class="u-photo" <img class="u-photo"
src = "{{ post.thumbnail | default: post.image }}" src = "{{ post.thumbnail | default: post.image }}"
alt="{{post.alt}}"> class = "{{ post.image_class }}"
alt="{{post.alt}}">
</figure>
<section class="title"> <section>
<h2 class="p-name blogroll-title"><a class="u-uid u-url" href="{{ post.url }}">{{ post.title }}</a></h2> <h2 class="p-name blogroll-title"><a class="u-uid u-url" href="{{ post.url }}">{{ post.title }}</a></h2>
<time class="dt-published" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time> <time class="dt-published" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time>
<summary class="p-summary">{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}</summary>
</section> </section>
<summary class="p-summary">{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}</summary>
</article> </article>
{% unless forloop.last %}
<hr class="blogroll">
{% endunless %}
{% endfor %} {% endfor %}