Skip to content

Commit 8a35a1d

Browse files
committed
Some posts
1 parent 764f118 commit 8a35a1d

File tree

11 files changed

+53
-13
lines changed

11 files changed

+53
-13
lines changed

.eleventy.js

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,26 @@ module.exports = function (eleventyConfig) {
2929

3030
// Image shortcode
3131
eleventyConfig.addShortcode("image", async function (src, alt, width = 90) {
32-
let metadata = await Image(`${path.dirname(this.page.inputPath)}/${src}`, {
33-
widths: [400, 800, 1200, "auto"],
32+
if (!alt) {
33+
throw new Error(`Missing alt text for image: ${src}`);
34+
}
35+
36+
// Directory containing the page
37+
const inputDir = path.dirname(this.page.inputPath);
38+
// Input path of the image
39+
const inputPath = path.join(inputDir, "assets", src);
40+
// URL to original image (relies on assets passthrough copy above)
41+
const originalUrl = `/assets/${src}`;
42+
43+
let metadata = await Image(inputPath, {
44+
widths: [400, 800, 1200],
3445
formats: ["jpg"],
3546
urlPath: "/img/",
3647
outputDir: "public/img/",
37-
filenameFormat: (id, src, width, format, options) => `${src.split("/").pop().split(".")[0]}-${width}.${format}`
48+
filenameFormat: (id, src, width, format) => {
49+
const imgName = path.parse(src).name;
50+
`${imgName}-${width}.${format}`
51+
}
3852
});
3953

4054
let imageAttributes = {
@@ -45,7 +59,11 @@ module.exports = function (eleventyConfig) {
4559
decoding: "async",
4660
};
4761

48-
return `<a href="${src}">${Image.generateHTML(metadata, imageAttributes)}</a>`;
62+
return `
63+
<a href="${originalUrl}" target="_blank" rel="noopener">
64+
${Image.generateHTML(metadata, imageAttributes)}
65+
</a>
66+
`;
4967
});
5068

5169
return {
@@ -55,4 +73,4 @@ module.exports = function (eleventyConfig) {
5573
output: "public"
5674
}
5775
}
58-
};
76+
};

drafts/blog_start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Starting a Blog
2+
title: Starting a blog
33
date: 2024-02-06
44
modified: 2024-12-09
55
---

src/_includes/post.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
{{ content }}
1919

20+
<br>
2021
<hr>
2122

2223
{%- assign previousPost = collections.post | getPreviousCollectionItem -%}
3.08 MB
Loading

src/assets/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ body {
1616
font-family: FiraSans, sans-serif;
1717
background-color: #1e1e1e;
1818
color: white;
19-
word-break: break-word;
19+
overflow-wrap: break-word;
2020
}
2121

2222
main {

src/assets/window.jpg

-228 KB
Binary file not shown.

src/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Hi, I'm Marcin Anforowicz. I enjoy working on projects that combine software, cr
66
Download my <a href="https://raw.githubusercontent.com/manforowicz/resume/main/Anforowicz_Marcin_resume.pdf" target="_blank">resume</a>
77
or visit my <a href="https://github.com/manforowicz">GitHub</a> to learn more!
88

9-
{% image "/assets/window.jpg", "Marcin looking through a window.", 50 %}
9+
{% image "marcin_mountain_2025.jpg", "Marcin on a mountain.", 50 %}
1010

1111
## Industry Experience
1212

@@ -28,16 +28,16 @@ Here are a few that I'm particularly proud of:
2828
<p>As an engineering intern at <a href="https://www.wibotic.com/">WiBotic</a>, I designed a stackable circuit board to hold charger modules on a shared CAN bus. It's used for running automated CAN bus tests.
2929
I also wrote over 3000 lines of <a href="https://github.com/wibotic/socketcand_translate">ESP32 firmware</a>
3030
to allow remotely connecting to the CAN bus via internet.</p>
31-
{% image "/assets/can_test_pcb.jpg", "Circuit board", 100 %}
31+
{% image "can_test_pcb.jpg", "Circuit board", 100 %}
3232
</div>
3333
<div class="horizontal-container">
34-
{% image "/assets/can_test_pcb_regulator.jpg", "Circuit board", 100 %}
34+
{% image "can_test_pcb_regulator.jpg", "Circuit board", 100 %}
3535
<p>To supply 3.3 volts to all the charger modules on my PCB, I designed and soldered a simple integrated buck converter.</p>
3636
</div>
3737
<div class="horizontal-container">
3838
<p>As a member of <a href="https://huskysat.org/">Husky Satellite Lab</a>
3939
I used <a href="https://www.kicad.org/">KiCad</a> to design circuit boards that will fly on HuskySat-2. Here's a photograph of a radio I designed, based heavily on <a href="https://github.com/OpenLST/openlst">OpenLST</a>.</p>
40-
{% image "/assets/circuit.jpg", "Circuit board", 100 %}
40+
{% image "circuit.jpg", "Circuit board", 100 %}
4141
</div>
4242

4343
At Husky Satellite Lab, I also designed and built a magnetorquer PCB. Instead of a conventional wire-wound coil, it uses an integrated PCB spiral. Here's a video I made about it:
4.7 MB
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: A way to build habits
3+
date: 2026-12-31
4+
---
5+
6+
As 2025 was starting, I decided to exercise more.
7+
Here's the strategy I used:
8+
9+
1. Choose an action that you'd like to do daily. For me that was doing a 1 minute plank, 15 push ups, and 5 pull ups. Aim low and make it realistic to avoid getting discouraged.
10+
11+
2. Hang a physical calendar in your room. Unlike an app or website, it's hard to forget about something hanging on your wall.
12+
13+
3. Whenever you do your action, draw an x on the next blank day in your calendar. This is very rewarding, because you can marvel at how many x's you've already drawn.
14+
15+
4. If you're not feeling well, skip days without guilt. Being too hard on yourself would discourage you from continuing.
16+
17+
5. Once you feel better, just do your action multiple times in a day. Each time, draw an x on the next blank day in the calendar until you catch up. If you're motivated, you can keep doing this to get ahead and build a buffer of x's.
18+
19+
Following this strategy, I did over 365 minutes of planking, 5475 push ups, and 1825 pull ups in the year of 2025.
20+
21+
{% image "calendar_photo_2025.jpg", "An image of a calendar with x markings on it." %}

src/posts/flock/flock.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Having every boid measure distance with all other boids to find its closest neig
7474
Thankfully, a data structure called the [KD-tree](https://en.wikipedia.org/wiki/K-d_tree) sorts boids in a way that lowers time complexity to `O(n log(n))`.
7575
I used a KD-tree from the Rust [kiddo](https://docs.rs/kiddo/latest/kiddo/) library.
7676

77-
{% image "/assets/kd-tree.png", "An image of a KD-Tree" %}
77+
{% image "kd-tree.png", "An image of a KD-Tree" %}
7878

7979
I wrote the actual simulation and rendering with the Rust [Macroquad](https://docs.rs/macroquad/latest/macroquad/) library. I compiled everything to web assembly (WASM) so it can be efficiently run online. View the code I wrote on [GitHub](https://github.com/manforowicz/boids).
8080

0 commit comments

Comments
 (0)