Skip to content

Commit 7ff2da2

Browse files
authored
Merge pull request #2 from javaDevJT/add-about
Add about blog post
2 parents 76a7ea7 + c50ff6d commit 7ff2da2

9 files changed

Lines changed: 161 additions & 14 deletions

File tree

frontend/src/components/CustomTerminalEnhanced.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ Try some commands you might not expect to work. 😉`;
417417
const secretDescriptions: Record<string, string> = {
418418
'konami_code': '🎮 Konami Code Master',
419419
'automotive_enthusiast': '🏎️ Automotive Enthusiast',
420-
'gearhead': '🔧 Gearhead',
421420
'mechanic': '🛠️ Mechanic',
422421
'vtec_kicked_in': '⚡ VTEC Activated',
423422
'gm_employee': '🏭 GM Insider',

frontend/src/utils/asciiArt.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export const vtecAscii = (): string => {
270270
║ ╚████╔╝ ██║ ███████╗╚██████╗ ║
271271
║ ╚═══╝ ╚═╝ ╚══════╝ ╚═════╝ ║
272272
║ ║
273-
║ JUST KICKED IN, YO! 🏎️💨
273+
║ JUST KICKED IN, YO!
274274
║ ║
275275
║ ┌────────────────────────────────────────────────────┐ ║
276276
║ │ RPM: ████████████████████ 6,000+ RPM │ ║
@@ -279,16 +279,16 @@ export const vtecAscii = (): string => {
279279
║ ║
280280
║ Variable Valve Timing & Lift Electronic Control ║
281281
║ Switching to high-performance cam profile... ║
282-
║ BWAAAAHHHHHHH! 🎵
282+
║ BWAAAAHHHHHHH!
283283
║ ║
284284
╚══════════════════════════════════════════════════════════╝
285285
`;
286286
};
287287

288288
export const matrixRain = (): string => {
289289
const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
290-
const width = 80;
291-
const height = 20;
290+
const width = 120;
291+
const height = 40;
292292
let result = '';
293293

294294
for (let i = 0; i < height; i++) {
@@ -369,7 +369,7 @@ export const konamiCode = (): string => {
369369
║ ██║ ██╗╚██████╔╝██║ ╚████║██║ ██║██║ ╚═╝ ██║██║ ║
370370
║ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ║
371371
║ ║
372-
🎮 KONAMI CODE ACTIVATED! 🎮
372+
║ KONAMI CODE ACTIVATED!
373373
║ ║
374374
║ You've unlocked: TURBO MODE ║
375375
║ ║
@@ -380,7 +380,7 @@ export const konamiCode = (): string => {
380380
║ │ • +30 Nostalgia Points │ ║
381381
║ └────────────────────────────────────────────────────┘ ║
382382
║ ║
383-
║ You clearly know your gaming history! 👾
383+
║ You clearly know your gaming history!
384384
║ Type 'secrets' to see what else you've unlocked! ║
385385
║ ║
386386
╚══════════════════════════════════════════════════════════╝

src/main/java/com/jtdev/website/service/ContentService.java

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ private String convertHtmlToAscii(String html, String dir) {
8989
// First pass: Convert headers with dynamic borders
9090
html = convertDynamicHeaders(html);
9191

92+
html = formatNestedLists(html);
93+
9294
// Convert HTML elements to ASCII formatting
9395
String text = html
9496
// Headers already converted above
@@ -100,8 +102,8 @@ private String convertHtmlToAscii(String html, String dir) {
100102
// Lists
101103
.replaceAll("<ul[^>]*>", "")
102104
.replaceAll("</ul>", "")
103-
.replaceAll("<li[^>]*>", "")
104-
.replaceAll("</li>", "\n")
105+
.replaceAll("<ol[^>]*>", "")
106+
.replaceAll("</ol>", "")
105107

106108
// Paragraphs
107109
.replaceAll("<p[^>]*>", "")
@@ -164,6 +166,90 @@ private String convertHtmlToAscii(String html, String dir) {
164166
return text.trim();
165167
}
166168

169+
private String formatNestedLists(String html) {
170+
Pattern pattern = Pattern.compile("(?is)<(ul|ol)[^>]*>|</(ul|ol)>|<li[^>]*>|</li>");
171+
Matcher matcher = pattern.matcher(html);
172+
StringBuilder result = new StringBuilder();
173+
Deque<ListContext> stack = new ArrayDeque<>();
174+
int lastEnd = 0;
175+
176+
while (matcher.find()) {
177+
result.append(html, lastEnd, matcher.start());
178+
String tag = matcher.group();
179+
String normalized = tag.toLowerCase(Locale.ROOT);
180+
181+
if (normalized.startsWith("<ul")) {
182+
stack.push(ListContext.unordered());
183+
} else if (normalized.startsWith("<ol")) {
184+
stack.push(ListContext.ordered());
185+
} else if (normalized.startsWith("</ul") || normalized.startsWith("</ol")) {
186+
if (!stack.isEmpty()) {
187+
stack.pop();
188+
}
189+
ensureTrailingNewline(result);
190+
} else if (normalized.startsWith("<li")) {
191+
ensureTrailingNewline(result);
192+
result.append(buildListPrefix(stack));
193+
} else if (normalized.startsWith("</li")) {
194+
ensureTrailingNewline(result);
195+
}
196+
197+
lastEnd = matcher.end();
198+
}
199+
200+
result.append(html.substring(lastEnd));
201+
return result.toString();
202+
}
203+
204+
private void ensureTrailingNewline(StringBuilder builder) {
205+
int length = builder.length();
206+
if (length == 0 || builder.charAt(length - 1) != '\n') {
207+
builder.append('\n');
208+
}
209+
}
210+
211+
private String buildListPrefix(Deque<ListContext> stack) {
212+
int depth = stack.isEmpty() ? 1 : stack.size();
213+
int indentSpaces = depth * 2;
214+
String indent = indentSpaces > 0 ? " ".repeat(indentSpaces) : "";
215+
ListContext context = stack.peek();
216+
217+
if (context != null && context.isOrdered()) {
218+
int index = context.nextIndex();
219+
return indent + index + ". ";
220+
}
221+
222+
String[] bullets = {"•", "◦", "▪", "▹", "▸"};
223+
String bullet = bullets[Math.min(depth - 1, bullets.length - 1)];
224+
return indent + bullet + " ";
225+
}
226+
227+
private static class ListContext {
228+
private final boolean ordered;
229+
private int index;
230+
231+
private ListContext(boolean ordered) {
232+
this.ordered = ordered;
233+
}
234+
235+
static ListContext ordered() {
236+
return new ListContext(true);
237+
}
238+
239+
static ListContext unordered() {
240+
return new ListContext(false);
241+
}
242+
243+
boolean isOrdered() {
244+
return ordered;
245+
}
246+
247+
int nextIndex() {
248+
index++;
249+
return index;
250+
}
251+
}
252+
167253
private String convertDynamicHeaders(String html) {
168254
// Convert H1 headers with dynamic borders
169255
Pattern h1Pattern = Pattern.compile("<h1[^>]*>(.*?)</h1>", Pattern.DOTALL);
36.9 KB
Loading
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
2+
# Hello
3+
4+
5+
Welcome to my website. I hope that you find some of the content intriguing. To start off, I will introduce myself.
6+
<br>
7+
<br>
8+
My name is Joshua Terk.<br>
9+
![headshot](298090299.jpg)
10+
<br>
11+
### Professional
12+
I am a software engineer at General Motors, and lead an SRE team responsible for In-Vehicle Product Cybersecurity applications. These applications consist of a suite of primarily Spring Boot applications running in a mix of containerized and VM environments. Throughput is in the millions of requests per day, and certain aspects of the suite are in the critical path for releasing software, unlocking ECUs (such as at dealerships), and manufacturing vehicles in real-time. Therefore, it goes without saying that these are vital to my company, and I am proud to lead such an important team.
13+
### Personal
14+
I am married to my beautiful wife, Michela, and we live together in the Detroit metro. I grew up in Texas, before graduating from Auburn University with a Bachelor's in Computer Science in 2021. Immediately following graduation, I escaped the heat of the south for Michigan. My interests align with my career path; For my entire life, I have had a significant interest in the automotive industry, as well as technology, making it extremely appropriate for my career path to lead me to intersection of the Automotive-Technology Venn-Diagram. I am careful to note that I consider myself an automotive industry enthusiast first, and 'car' enthusiast second, due to the fact that many car enthusiasts would consider is sacrilege that my preferred method of transport is electric cars. I do still have a special place in my heart for ICE vehicles, though!
15+
<br>
16+
Previous vehicles:
17+
- 2014 Chevrolet Cruze in Silver (Sold)
18+
- CAI
19+
- Big injectors
20+
- E85 tune
21+
- Resonator delete
22+
- 2012 Toyota Camry V6 in Hideous Green (Sold)
23+
- Good riddance
24+
- 2015 VW Golf GTI in White (Sold)
25+
- APR Stage 2 ECU & TCU
26+
- OBDEleven Code Mods
27+
- 2017 VW Golf R in Lapiz Blue Metallic (Sold)
28+
- EQT Stage 2 ECU & TCU
29+
- Resonator delete
30+
- OBDEleven Code Mods
31+
- 2014 Tesla Model S P85D in Black (Sold)
32+
- Intel MCU upgrade
33+
- TSportline Wheels
34+
- 2018 Tesla Model 3 LR in White (Sold)
35+
- Ingenext Ghost Module (Uncorks LR to Performance)
36+
- Unplugged Performance Aero Spoiler
37+
- 2024 Tesla Cybertruck Cyberbeast (Sold)
38+
- Screen swivel kit
39+
- CybertruckCO lift rods
40+
- 1.5" wheel spacers
41+
- Onboard air compressor
42+
- Duratrac ATs
43+
- 2012 Nissan Leaf in Silver (Sold)
44+
- Idk man, it was super cheap and quirky
45+
- 2016 Tesla Model X 75D
46+
- Free unlimited supercharging!
47+
- Goofy doors
48+
- Intel MCU upgrade
49+
- Thinking about a battery upgrade
50+
- 2025 Tesla Cybertruck Cyberbeast
51+
- Free unlimited supercharging!
52+
- Screen swivel kit
53+
- CybertruckCO lift rods
54+
- 1.5" wheel spacers
55+
- Onboard air compressor
56+
- Lower lightbar
57+
- Cybertent
58+
- Fridge
59+
- Starlink
60+
- Auxiliary battery pack for fridge
61+
62+
63+
Over time, I hope to provide content that might be useful to those that come across it in the future. This site is both a portfolio showcase, and a place for my thoughts about my field/interests (both automotive, and tech) to be shared.
64+
<br>
65+
<br>
66+
Please take time to explore!
67+
<br>
21.5 KB
Loading

src/main/resources/directories/blog/SAMPLE.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)