Skip to content

Commit

Permalink
push current state of migration
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenPG committed Oct 5, 2024
1 parent 2d6bf9f commit 548b8db
Show file tree
Hide file tree
Showing 47 changed files with 179 additions and 76 deletions.
2 changes: 2 additions & 0 deletions astro/astro-paper-main/astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react";
import partytown from "@astrojs/partytown"
import remarkToc from "remark-toc";
import remarkCollapse from "remark-collapse";
import sitemap from "@astrojs/sitemap";
Expand All @@ -15,6 +16,7 @@ export default defineConfig({
}),
react(),
sitemap(),
partytown({ config: { forward: ['dataLayer.push'] } }),
],
markdown: {
remarkPlugins: [
Expand Down
25 changes: 25 additions & 0 deletions astro/astro-paper-main/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions astro/astro-paper-main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"typescript": "^5.5.3"
},
"devDependencies": {
"@astrojs/partytown": "^2.1.2",
"@astrojs/react": "^3.6.2",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions astro/astro-paper-main/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const SITE: Site = {
profile: "https://stevenpg.com/",
desc: "My Tech and Life Blog with the writing the articles I wish were written!",
title: "Coding Steve",
// TODO - replace image
ogImage: "astropaper-og.jpg",
lightAndDarkMode: true,
postPerIndex: 4,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
layout: post
title: "Easy Spring Rest Client w/ OAuth2"
toc: true
date: 2024-09-19 12:00:00 -0500
categories:
- software
- spring boot
- java
author: StevenPG
pubDatetime: 2024-09-19T12:00:00.000Z
title: Easy Spring Rest Client w/ OAuth2
slug: spring-rest-client-oauth2
featured: true
# TODO replace ogImage
ogImage: https://user-images.githubusercontent.com/53733092/215771435-25408246-2309-4f8b-a781-1f3d93bdf0ec.png
tags:
- software
- spring boot
- java
description: An article walking through a demo of partitioning tables with postgres.
---

# Brief
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
---
layout: post
title: "GraalVM Native Image Reflect Config Demystified"
toc: true
date: 2024-04-13 12:00:00 -0500
categories:
author: StevenPG
pubDatetime: 2024-04-13T12:00:00.000Z
title: GraalVM Native Image Reflect Config Demystified
slug: graalvm-reflect-config-demystified
featured: true
# TODO replace ogImage
ogImage: https://user-images.githubusercontent.com/53733092/215771435-25408246-2309-4f8b-a781-1f3d93bdf0ec.png
tags:
- software
- spring boot
- graalvm
- native-image
description: An article describing the latest way to log spring web client requests and responses using Logbook.
---

One of the hardest things about compiling a Spring Boot application into a GraalVM native image is
Expand Down Expand Up @@ -37,7 +40,7 @@ tracing agent looks to write.
To accomplish this, we're going to create a new project and go through a typical workflow to build and update
a native-image application.

![Image of Spring Initializr]({{site.url}}{{site.baseurl}}/assets/f8eae9e1-d1b0-4ee0-a19a-56a6ea290af3.png)
![Image of Spring Initializr](/assets/f8eae9e1-d1b0-4ee0-a19a-56a6ea290af3.png)

We can use Spring Initializr to generate our test project.

Expand Down Expand Up @@ -162,7 +165,7 @@ creating the `src/main/resources/META-INF/native-image` directory.

Inside, we'll create the reflect-config.json file.

![Directory Sample]({{site.url}}{{site.baseurl}}/assets/b40a4c04-5106-4a2e-9947-95eadcc59bb3.png)
![Directory Sample](/assets/b40a4c04-5106-4a2e-9947-95eadcc59bb3.png)

## Breaking Down Reflect-Config

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
layout: post
title: "Homelab Drives & Buying Used"
date: 2024-07-21 12:00:00 -0500
categories:
author: StevenPG
pubDatetime: 2024-07-21T12:00:00.000Z
title: Homelab Drives & Buying Used
slug: buying-used-harddrives
featured: false
# TODO replace ogImage
ogImage: https://user-images.githubusercontent.com/53733092/215771435-25408246-2309-4f8b-a781-1f3d93bdf0ec.png
tags:
- hardware
description: An article with a short overview of my experiece buying used drives and using smartctl.
---

# Homelab Drives & Buying Used
Expand All @@ -19,10 +24,10 @@ lsblk: Displays block devices with their mount points, label, UUID, and size.
smartctl: Retrieves S.M.A.R.T. data, which provides information about the drive's health, performance, and reliability.
Basic Commands:

{% highlight bash %}
```bash
sudo lsblk -f
sudo smartctl --all /dev/sda > output.txt
{% endhighlight %}
```


The first command lists your block devices, while the second saves the S.M.A.R.T. data of /dev/sda to a text file for analysis.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
layout: post
title: "Jdk 23 Streams - How To Use Gather Operations"
toc: true
date: 2024-09-29 12:00:00 -0500
categories:
- software
- java
author: StevenPG
pubDatetime: 2024-09-29T12:00:00.000Z
title: Jdk 23 Streams - How To Use Gather Operations
slug: jdk23-streams-gather
featured: false
# TODO replace ogImage
ogImage: https://user-images.githubusercontent.com/53733092/215771435-25408246-2309-4f8b-a781-1f3d93bdf0ec.png
tags:
- software
- spring boot
- java
description: An article on how to use the Gather stream operation in JDK23
---

# It's finally here! JDK 23
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
---
layout: post
title: "Logging Request Body with Spring WebClient"
date: 2024-03-05 12:00:00 -0500
categories:
author: StevenPG
pubDatetime: 2024-03-05T12:00:00.000Z
title: Logging Request Body with Spring WebClient
slug: request-body-with-spring-webclient
featured: true
# TODO replace ogImage
ogImage: https://user-images.githubusercontent.com/53733092/215771435-25408246-2309-4f8b-a781-1f3d93bdf0ec.png
tags:
- software
- spring webflux
- spring boot
description: An article describing the latest way to log spring web client requests and responses using Logbook.
---

## Previously!
Expand All @@ -17,7 +22,7 @@ I was frustrated that I couldn't find any full examples, so (being the change I

That's resulted in a very very small, but non-zero amount of traffic to that article.

![Image of page view statistics, showing 22k visitors since 2020]({{site.url}}{{site.baseurl}}/assets/3GzdjxY.png)
![Image of page view statistics, showing 22k visitors since 2020](/assets/3GzdjxY.png)

While that would normally be something I'm happy about, the methodology in my old article is outdated and poorly recommended.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
---
layout: post
title: "Converting Spring Boot 2 to Spring Boot 3 Native Image w/ GraalVM"
toc: true
date: 2024-03-04 12:00:00 -0500
categories:
- software
author: StevenPG
pubDatetime: 2024-03-04T12:00:00.000Z
title: Converting Spring Boot 2 to Spring Boot 3 Native Image w/ GraalVM
slug: spring2-to-spring3-graalvm
featured: true
# TODO replace ogImage
ogImage: https://user-images.githubusercontent.com/53733092/215771435-25408246-2309-4f8b-a781-1f3d93bdf0ec.png
tags:
- story
- spring boot
- graalvm
- native-image
description: A walkthrough of updating a Spring Boot 2 application to Spring 3 running on GraalVM as a native application.
---

# Migrating to Spring Boot 3 and Native Image
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
---
layout: post
title: "My First Post, on My First Blog"
date: 2024-02-04 12:00:00 -0500
categories:
author: StevenPG
pubDatetime: 2024-02-04T12:00:00.000Z
title: My First Post, on My First Blog
slug: my-first-post
featured: false
# TODO replace ogImage
ogImage: https://user-images.githubusercontent.com/53733092/215771435-25408246-2309-4f8b-a781-1f3d93bdf0ec.png
tags:
- story
- tech
description: My first blog post, describing the original Jekyll blog and a migration to Astro.
---

## The Hook

TODO - update with Astro migration

What do I write on my first post under the "Tech Posts" section of this blog? It's gotta be something
tech related... And the only thing on my mind is this blog made with Jekyll. So I'll write a little
bit about my setup and Jekyll!

TODO - replace this with Astro migration, keep jekyll stuff

## How these pages were built

Shout-out to [Chad Baldwin][chadbaldwin.net], who's blog I came across when I started searching on how to
Expand All @@ -26,7 +35,7 @@ So I jumped over to [Jekyll's Install][jekyll-install] and got it installed on m
Speaking of my local machine, I do nearly all of my work on a steeply discounted Apple M1 Pro I picked up
right when the M2 Pro released.

![Image of Directory]({{site.url}}{{site.baseurl}}/assets/LvdGYAG.jpg)
![Image of Directory](/assets/LvdGYAG.jpg)

In the spirit of open source, I've been cross referencing Chad's blog
and the official Jekyll documentation.
Expand All @@ -47,7 +56,7 @@ I wanted by default (default.html), and for my home page (home.html).

[The layout docs are right here](https://jekyllrb.com/docs/step-by-step/04-layouts/)

![Image of Directory]({{site.url}}{{site.baseurl}}/assets/44wMq0Z.png)
![Image of Directory](/assets/44wMq0Z.png)

I followed the instructions in the Blogging section of the step-by-step and took some
inspiration from Chad's repository, and separated my posts into personal and tech.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
layout: post
title: "Partitioning Tables with Progress"
toc: true
date: 2024-06-05 12:00:00 -0500
categories:
author: StevenPG
pubDatetime: 2024-06-05T12:00:00.000Z
title: Partitioning Tables with Progress
slug: partitioning-tables-postgres
featured: false
# TODO replace ogImage
ogImage: https://user-images.githubusercontent.com/53733092/215771435-25408246-2309-4f8b-a781-1f3d93bdf0ec.png
tags:
- software
- spring boot
- postgres
description: An article walking through a demo of partitioning tables with postgres.
---

# Partitioning Databases in PostgreSQL
Expand Down Expand Up @@ -99,25 +103,25 @@ Now that we have our database configured, we'll start reviewing some queries:

explain select * from public.traffic_data

![Full Table Scan]({{site.url}}{{site.baseurl}}/assets/a368fd78-2be5-412b-b744-265e20ef4aef.png)
![Full Table Scan](/assets/a368fd78-2be5-412b-b744-265e20ef4aef.png)


We can see that when we query the entire table, we do a sequential scan across the
entire database. Now lets throw a `where` clause in and see what happens!

Lets run the query `select * from public.traffic_data where measure_date < '2024-02-15'`

![Query result]({{site.url}}{{site.baseurl}}/assets/7225cac2-0224-4f0a-ae86-8057a1629022.png)
![Query result](/assets/7225cac2-0224-4f0a-ae86-8057a1629022.png)

We see that we got the data we expected, but what happened in postgres?

![2 Table Scan]({{site.url}}{{site.baseurl}}/assets/8aaaf23a-d737-4e9d-bcb4-61ddcc9e5a2a.png)
![2 Table Scan](/assets/8aaaf23a-d737-4e9d-bcb4-61ddcc9e5a2a.png)

We see that we did a sequential scan of the two tables that were relevant for us,
but we never scanned our third table. If we were to query a more specific date, we know
that we would only scan the relevant table!

![Single Table Scan]({{site.url}}{{site.baseurl}}/assets/c972da73-155a-426a-b487-5ad73295c918.png)
![Single Table Scan](/assets/c972da73-155a-426a-b487-5ad73295c918.png)

Pairing this with indexing allows us to really optimize our tables!

Expand Down
Loading

0 comments on commit 548b8db

Please sign in to comment.