mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-21 15:56:29 -05:00
Medium Syndication Data
This commit is contained in:
parent
e8c9b33f2d
commit
79329aae66
13 changed files with 85 additions and 61 deletions
|
@ -1,11 +1,16 @@
|
|||
---
|
||||
title: "Archiving Toots"
|
||||
date: 2022-05-20T22:47:48-04:00
|
||||
date: 2022-05-20 22:47:48-04:00
|
||||
draft: false
|
||||
tags: ["Hugo", "Mastodon", "Archive"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: c1b813e3dff0
|
||||
tags:
|
||||
- Hugo
|
||||
- Mastodon
|
||||
- Archive
|
||||
title: Archiving Toots
|
||||
---
|
||||
|
||||
In the spirit of [syndicating Mastodon toots](/blog/why-i-pesos-from-mastodon/)
|
||||
to my own site, I wrote a Python script that turns toots into Hugo markdown
|
||||
files.
|
||||
|
@ -104,4 +109,4 @@ My full [script](https://github.com/Brandon-Rozek/website-toots/blob/main/.scrip
|
|||
is on GitHub.
|
||||
The script will let you know of any toot IDs that are created
|
||||
and/or updated. I then add these toots to Git for version control
|
||||
just like my posts.
|
||||
just like my posts.
|
|
@ -1,10 +1,13 @@
|
|||
---
|
||||
title: "Automatically Updating Podman Containers"
|
||||
date: 2022-05-15T22:20:47-04:00
|
||||
date: 2022-05-15 22:20:47-04:00
|
||||
draft: false
|
||||
tags: ["Linux", "Containers"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 9fe3d313dea8
|
||||
tags:
|
||||
- Linux
|
||||
- Containers
|
||||
title: Automatically Updating Podman Containers
|
||||
---
|
||||
|
||||
Recently, I have been [transitioning to Podman](/blog/rootless-docker-compose-podman) for running my container infrastructure. In the process, I brought over Watchtower which I have previously used for auto-updating docker containers. Before doing so, I didn't check its [compatibility](https://github.com/containrrr/watchtower/issues/1060) (whoops) and found a few of my containers would every other week or so not come back up.
|
||||
|
@ -28,5 +31,4 @@ TimeoutStartSec=0
|
|||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
```
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Most Common Mistake in Induction Proofs"
|
||||
date: 2022-05-15T22:49:34-04:00
|
||||
date: 2022-05-15 22:49:34-04:00
|
||||
draft: false
|
||||
tags: ["Math"]
|
||||
math: true
|
||||
medium_enabled: true
|
||||
medium_post_id: 9a14aa49d67a
|
||||
tags:
|
||||
- Math
|
||||
title: Most Common Mistake in Induction Proofs
|
||||
---
|
||||
|
||||
One of the most common mistakes I see in induction proofs is assuming the recursive case and working backwards towards the induction hypothesis. This may be fine for formulas that are symmetric like those involving equality, but this way of proving induction fails if not. This post will show such example.
|
||||
|
@ -61,5 +63,4 @@ Remember, when performing the induction step of the proof:
|
|||
- State the induction hypotheses
|
||||
- State what formulas you know about the various variables
|
||||
- Substitute into the **induction hypothesis**
|
||||
- Simplify until you reach the $n+1$th step.
|
||||
|
||||
- Simplify until you reach the $n+1$th step.
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Conditional Assignment in Bash"
|
||||
date: 2022-06-19T18:49:47-04:00
|
||||
date: 2022-06-19 18:49:47-04:00
|
||||
draft: false
|
||||
tags: ["Bash"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 8217bfd3af16
|
||||
tags:
|
||||
- Bash
|
||||
title: Conditional Assignment in Bash
|
||||
---
|
||||
|
||||
Many programming languages include an quick way to perform a
|
||||
|
@ -37,4 +39,4 @@ so that if the first condition (`[ $AGE -gt 18 ]`) is false, then it
|
|||
will skip the right side of the AND (`&&`) expression. This is because
|
||||
`False && True` is always `False`. However, `False || True` is equal
|
||||
to `True`, so the language needs to evaluate the right part of an
|
||||
OR (`||`) expression.
|
||||
OR (`||`) expression.
|
|
@ -1,10 +1,13 @@
|
|||
---
|
||||
title: "Displaying a Toot in Hugo"
|
||||
date: 2022-05-20T16:57:11-04:00
|
||||
date: 2022-05-20 16:57:11-04:00
|
||||
draft: false
|
||||
tags: ["Hugo", "Mastodon"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: a10174e115a2
|
||||
tags:
|
||||
- Hugo
|
||||
- Mastodon
|
||||
title: Displaying a Toot in Hugo
|
||||
---
|
||||
|
||||
Mastodon for me is a nice friendly place and I enjoy participating in that community. With that, I want to be able to share the great toots out there in my own website as well as keep an archive of all the toots I made. This post will go over the code I wrote in Hugo to display a single toot into a blog post.
|
||||
|
@ -264,4 +267,4 @@ I wrote [a python script](https://github.com/Brandon-Rozek/website/blob/9947478c
|
|||
|
||||
## Conclusion
|
||||
|
||||
I'm happy to see that Mastodon doesn't make it difficult to query and parse data from their platform. Within one toot there are a lot of possibilities for its type. For example, it can be a reply, a boost, or include a content warning label. To quickly get the basics (which includes replies), I ignored many of the fields. I would like to come back to this in the future and explore how to design for the other cases as well.
|
||||
I'm happy to see that Mastodon doesn't make it difficult to query and parse data from their platform. Within one toot there are a lot of possibilities for its type. For example, it can be a reply, a boost, or include a content warning label. To quickly get the basics (which includes replies), I ignored many of the fields. I would like to come back to this in the future and explore how to design for the other cases as well.
|
|
@ -1,10 +1,13 @@
|
|||
---
|
||||
title: "Displaying Hikes with gpx.studio"
|
||||
date: 2022-05-23T16:35:01-04:00
|
||||
date: 2022-05-23 16:35:01-04:00
|
||||
draft: false
|
||||
tags: ["Hugo", "GPS"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: ac442c9cf7fc
|
||||
tags:
|
||||
- Hugo
|
||||
- GPS
|
||||
title: Displaying Hikes with gpx.studio
|
||||
---
|
||||
|
||||
As the weather gets warmer, I am starting to go on more hikes. Several people on their websites share a Strava embed which highlights a path taken during their workout. I believe as a community this has great potential for sharing our favorite hiking paths. I don't, however, want to rely on Strava to host my GPS data. Instead, we will showcase how to accomplish the same effect but with open technologies.
|
||||
|
@ -91,4 +94,4 @@ We can then replace the URL in the array with the one that you'll use for your w
|
|||
|
||||
## Conclusion
|
||||
|
||||
With this we created a cool visual representation of GPX data on our own website built on top of open technologies. Since our routes are stored in GPX files, if gpx.studio was to go down, then we can likely find an alternative to plot the file for us. Gpx.studio is also built on top of OpenStreetMap, a great long-standing community driven mapping project.
|
||||
With this we created a cool visual representation of GPX data on our own website built on top of open technologies. Since our routes are stored in GPX files, if gpx.studio was to go down, then we can likely find an alternative to plot the file for us. Gpx.studio is also built on top of OpenStreetMap, a great long-standing community driven mapping project.
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Document Formats and Plaintext"
|
||||
date: 2022-05-19T21:24:52-04:00
|
||||
date: 2022-05-19 21:24:52-04:00
|
||||
draft: false
|
||||
tags: ["Documentation"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: b339b9d9793b
|
||||
tags:
|
||||
- Documentation
|
||||
title: Document Formats and Plaintext
|
||||
---
|
||||
|
||||
Microsoft Word, Apple Pages, Google Docs, Libreoffice Writer all provide a method of writing and formatting text. This is then normally stored in a "binary" file. I put binary in quotes as they are often stored in a zip archive of XML files. However, because it's in a zip archive, I cannot use standard plaintext tools to search within the document.
|
||||
|
@ -34,4 +36,4 @@ So what plaintext formats do I currently use on a day-to-day?
|
|||
- Academic papers: LaTex
|
||||
- Presentations: LaTex (unless they need video)
|
||||
|
||||
If you're interested in learning how to work with plaintext and other cool things, check out the [Plain Text Project](https://plaintextproject.online/) by [Scott Nesbitt](https://scottnesbitt.net/).
|
||||
If you're interested in learning how to work with plaintext and other cool things, check out the [Plain Text Project](https://plaintextproject.online/) by [Scott Nesbitt](https://scottnesbitt.net/).
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Git Pushing to Multiple Remotes"
|
||||
date: 2022-06-02T21:19:29-04:00
|
||||
date: 2022-06-02 21:19:29-04:00
|
||||
draft: false
|
||||
tags: ["Git"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 41533d2710fd
|
||||
tags:
|
||||
- Git
|
||||
title: Git Pushing to Multiple Remotes
|
||||
---
|
||||
|
||||
Git's greatest strength is its first-class support for decentralization.
|
||||
|
@ -41,4 +43,4 @@ I only recently started using [SourceHut](https://sr.ht/).
|
|||
It's designed by [Drew Devault](https://drewdevault.com/)
|
||||
and others to feature the original usage of git, via email.
|
||||
This method is still in use by the Linux kernel development team.
|
||||
I'm excited to try it out and hopefully write some future posts on this concept.
|
||||
I'm excited to try it out and hopefully write some future posts on this concept.
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Retreiving GPS data in decimal format from EXIF data in photos"
|
||||
date: 2022-06-19T19:01:35-04:00
|
||||
date: 2022-06-19 19:01:35-04:00
|
||||
draft: false
|
||||
tags: ["GPS"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 45193055c22d
|
||||
tags:
|
||||
- GPS
|
||||
title: Retreiving GPS data in decimal format from EXIF data in photos
|
||||
---
|
||||
|
||||
For a new feature that I'm cooking up for my website, I need to grab the GPS information from the EXIF data stored in my images. Luckily, `imagemagick`
|
||||
|
@ -109,4 +111,4 @@ LON_PREFIX=$([ $LON_DIR == "W" ] && echo "-" || echo "")
|
|||
echo "$LAT_PREFIX$LAT_DEC"
|
||||
echo "$LON_PREFIX$LON_DEC"
|
||||
echo "$ALT_DEC"
|
||||
```
|
||||
```
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Hiding Section From Listing in Hugo"
|
||||
date: 2022-05-19T22:43:04-04:00
|
||||
date: 2022-05-19 22:43:04-04:00
|
||||
draft: false
|
||||
tags: ["Hugo"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: d71625f9235b
|
||||
tags:
|
||||
- Hugo
|
||||
title: Hiding Section From Listing in Hugo
|
||||
---
|
||||
|
||||
In Hugo you can list all the sections using the following code
|
||||
|
@ -48,5 +50,4 @@ Then replace the listing code with the following:
|
|||
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
```
|
|
@ -1,12 +1,14 @@
|
|||
---
|
||||
title: "Python Argument Parser"
|
||||
date: 2022-05-16T17:07:06-04:00
|
||||
draft: false
|
||||
tags: ["Python"]
|
||||
aliases:
|
||||
- /blog/python-argpase/
|
||||
- /blog/python-argpase/
|
||||
date: 2022-05-16 17:07:06-04:00
|
||||
draft: false
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 7d4c148bd2d0
|
||||
tags:
|
||||
- Python
|
||||
title: Python Argument Parser
|
||||
---
|
||||
|
||||
*For a much better description of argument parsing in Python, please visit https://docs.python.org/3/library/argparse.html.*
|
||||
|
@ -53,7 +55,4 @@ Within the code you can parse the argument names by accessing the `args` diction
|
|||
pos_arg1 = args['pos_arg1']
|
||||
flag1 = args['flag1']
|
||||
flag2 = args['flag2']
|
||||
```
|
||||
|
||||
|
||||
|
||||
```
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Having your Website Visible on the Fediverse"
|
||||
date: 2022-06-12T18:35:30-04:00
|
||||
date: 2022-06-12 18:35:30-04:00
|
||||
draft: false
|
||||
tags: ["Mastodon"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 3c4fe896f3fb
|
||||
tags:
|
||||
- Mastodon
|
||||
title: Having your Website Visible on the Fediverse
|
||||
---
|
||||
|
||||
[ActivityPub](https://www.w3.org/TR/activitypub/) is the backbone
|
||||
|
@ -116,4 +118,4 @@ but sadly it does not show any of them. I'm not entirely
|
|||
sure why, though my hypothesis is that the posts need to be pushed
|
||||
to the Mastodon server when its created. It could also be that the
|
||||
actor isn't defined properly in the activity JSON feed. If you happen
|
||||
to know please get in touch.
|
||||
to know please get in touch.
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
title: "On Writing Simple Scripts"
|
||||
date: 2022-05-19T20:40:19-04:00
|
||||
date: 2022-05-19 20:40:19-04:00
|
||||
draft: false
|
||||
tags: []
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 63c82315e4f5
|
||||
tags: []
|
||||
title: On Writing Simple Scripts
|
||||
---
|
||||
|
||||
I generally prefer a simpler solution to a problem if possible. This comes especially true with scripting. If I write a small script for something like say my website I generally have three requirements of the system:
|
||||
|
@ -33,5 +34,4 @@ So why Python?
|
|||
- Comes preinstalled on most Linux systems as they're often used in desktop environments
|
||||
- Currently has developer mindshare so others are apt to understand the scripts
|
||||
|
||||
Both those reasons are likely to make it so that my choice will change over time. Perl used to be the very popular choice for scripting...
|
||||
|
||||
Both those reasons are likely to make it so that my choice will change over time. Perl used to be the very popular choice for scripting...
|
Loading…
Reference in a new issue