Skip to content

Commit

Permalink
Merge pull request #6 from madole/updates-to-resume
Browse files Browse the repository at this point in the history
Added: base64 encoded query (q) param for future roles
  • Loading branch information
madole committed Apr 25, 2024
2 parents 5398396 + 28afbda commit a5e3d3f
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 174 deletions.
18 changes: 18 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-AU"
early_access: false
reviews:
profile: "assertive"
request_changes_workflow: false
high_level_summary: true
poem: true
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
drafts: false
chat:
auto_reply: true
287 changes: 147 additions & 140 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
"generate-rss": "node scripts/generate-rss.js"
},
"dependencies": {
"@eslint/js": "^9.0.0",
"@eslint/js": "^9.1.1",
"@mapbox/rehype-prism": "^0.9.0",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/mdx": "^3.0.1",
"@next/mdx": "^14.2.1",
"@next/mdx": "^14.2.3",
"@react-three/drei": "^9.105.4",
"@react-three/fiber": "^8.16.2",
"@types/three": "^0.163.0",
"date-fns": "^3.6.0",
"feed": "^4.2.2",
"front-matter": "^4.0.2",
"marked": "^12.0.1",
"next": "14.2.1",
"marked": "^12.0.2",
"next": "14.2.3",
"prismjs": "^1.29.0",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand All @@ -39,7 +39,7 @@
"@types/react": "18.2.79",
"@types/react-syntax-highlighter": "^15.5.11",
"autoprefixer": "^10.4.19",
"eslint": "^9.0.0",
"eslint": "^9.1.1",
"frontmatter-markdown-loader": "^3.7.0",
"inquirer": "^9.2.19",
"next-mdx-remote": "^4.4.1",
Expand All @@ -48,4 +48,4 @@
"tailwindcss": "^3.4.3",
"typescript": "5.4.5"
}
}
}
85 changes: 64 additions & 21 deletions pages/resume.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Head from "next/head";
import Image from "next/image";
import { useState } from "react";
import { ReactNode, useEffect, useState } from "react";
import FlexCenter from "../components/FlexCenter";
import Card, { Hr, Spacer } from "../components/resume/Card";
import CardDialog from "../components/resume/CardDialog";
Expand All @@ -16,13 +16,51 @@ function getUrlSearchParam(searchParam: string): string | null {
return urlParams.get(searchParam);
}

/**
* Adding a future job to the resume via querystring
*
* We use the `q` attribute
* We base64 encode a JSON object with the future job title (t) and company (c) with btoa
*
* @example
* btoa('{"c": "NASA","t": "CEO"}')
* //eyJjIjogIk5BU0EiLCJ0IjogIkNFTyJ9
*
* Querystring becomes
* ?q=eyJjIjogIk5BU0EiLCJ0IjogIkNFTyJ9
*
*/
function Resume(): JSX.Element {
const futureCompany = getUrlSearchParam("future");
const futureTitle = getUrlSearchParam("title") ?? "Technical Lead";
const [futureTitle, setFutureTitle] = useState("Technical Lead");
const [futureCompany, setFutureCompany] = useState("");
const [hobbiesOpen, setHobbiesOpen] = useState(false);
const [socialOpen, setSocialOpen] = useState(false);
const [techOpen, setTechOpen] = useState(false);

useEffect(() => {
const q = getUrlSearchParam("q");
if (!q) {
return;
}
let future;
try {
const decoded = atob(q);
future = JSON.parse(decoded);
} catch (e) {
console.error("Failed to parse q", e);
return;
}
const title = future.t;

if (title) {
setFutureTitle(title);
}
const company = future.c;
if (company) {
setFutureCompany(company);
}
}, []);

return (
<>
<Head>
Expand All @@ -39,7 +77,7 @@ function Resume(): JSX.Element {
Approx{" "}
{new Intl.NumberFormat().format(
differenceInCalendarYears(new Date(), new Date(2010, 6, 1)) *
2000
2000,
)}{" "}
hours
</div>
Expand Down Expand Up @@ -238,6 +276,7 @@ function Resume(): JSX.Element {
height={300}
src="/arset-spectral-indicies.png"
alt="ARSET Spectral Indicies certificate"
priority={true}
/>
</FlexCenter>
</Card>
Expand All @@ -255,10 +294,31 @@ function Resume(): JSX.Element {
height={300}
src="/arset-analyzing-air-quality-data.png"
alt="ARSET Accessing and Analyzing Air Quality Data from Geostationary Satellites certificate"
priority={true}
/>
</FlexCenter>
</Card>
</Column>
{futureCompany && (
<Column title="Future">
<Card>
<span className="pb-1 font-bold">{futureTitle}</span>
{futureCompany}
</Card>
<Card>
<Hr />
</Card>
<Card>
<Image
src="https://media.giphy.com/media/aNqEFrYVnsS52/giphy.gif"
alt="keyboard cat"
width="255"
height="200"
priority={false}
/>
</Card>
</Column>
)}
<Column title="January 2021...">
<Card>
<span className="pb-1 font-bold">
Expand Down Expand Up @@ -497,23 +557,6 @@ function Resume(): JSX.Element {
Central Services Agency Northern Ireland
</Card>
</Column>
{futureCompany && (
<Column title="Future">
<Card>
<span className="pb-1 font-bold">{futureTitle}</span>
{futureCompany}
</Card>
<Card>
<Hr />
</Card>
<Card>
<Image
src="https://media.giphy.com/media/aNqEFrYVnsS52/giphy.gif"
alt="keyboard cat"
/>
</Card>
</Column>
)}
</div>
</div>
</>
Expand Down
6 changes: 3 additions & 3 deletions public/rss.atom
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://madole.xyz/</id>
<title>Madole.xyz Blog</title>
<updated>2023-12-19T00:10:48.583Z</updated>
<updated>2024-04-25T22:59:57.960Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<author>
<name>Andrew McDowell</name>
Expand All @@ -22,8 +22,8 @@
<updated>2023-12-18T23:48:15.845Z</updated>
<summary type="html"><![CDATA[Reading time: 6 min read]]></summary>
<content type="html"><![CDATA[<h2>What are Spectral Indices in Remote Sensing?</h2>
<p>Spectral Indices are a set of mathematical equations performed on a per-pixel basis on data coming from multispectral remote sensing data.</p>
<p>When looking at Satellite data, you don’t get a single image,</p>
<p>Spectral Indices are a set of mathematical equations performed on a per-pixel basis on data coming from multispectral remote sensing (satellite) data.</p>
<p>When looking at satellite data, you don’t get a s</p>
]]></content>
<author>
<name>Andrew McDowell</name>
Expand Down
2 changes: 1 addition & 1 deletion public/rss.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"items": [
{
"id": "https://madole.xyz/blog/spectral-indices",
"content_html": "<h2>What are Spectral Indices in Remote Sensing?</h2>\n<p>Spectral Indices are a set of mathematical equations performed on a per-pixel basis on data coming from multispectral remote sensing data.</p>\n<p>When looking at Satellite data, you don’t get a single image,</p>\n",
"content_html": "<h2>What are Spectral Indices in Remote Sensing?</h2>\n<p>Spectral Indices are a set of mathematical equations performed on a per-pixel basis on data coming from multispectral remote sensing (satellite) data.</p>\n<p>When looking at satellite data, you don’t get a s</p>\n",
"url": "https://madole.xyz/blog/spectral-indices",
"title": "What are Spectral Indices in Remote Sensing?",
"summary": "Reading time: 6 min read",
Expand Down
6 changes: 3 additions & 3 deletions public/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Madole.xyz Blog</title>
<link>http://madole.xyz/</link>
<description>Blog posts from madole.xyz</description>
<lastBuildDate>Tue, 19 Dec 2023 00:10:48 GMT</lastBuildDate>
<lastBuildDate>Thu, 25 Apr 2024 22:59:57 GMT</lastBuildDate>
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<generator>https://github.com/jpmonette/feed</generator>
<language>en</language>
Expand All @@ -21,8 +21,8 @@
<pubDate>Mon, 18 Dec 2023 23:48:15 GMT</pubDate>
<description><![CDATA[Reading time: 6 min read]]></description>
<content:encoded><![CDATA[<h2>What are Spectral Indices in Remote Sensing?</h2>
<p>Spectral Indices are a set of mathematical equations performed on a per-pixel basis on data coming from multispectral remote sensing data.</p>
<p>When looking at Satellite data, you don’t get a single image,</p>
<p>Spectral Indices are a set of mathematical equations performed on a per-pixel basis on data coming from multispectral remote sensing (satellite) data.</p>
<p>When looking at satellite data, you don’t get a s</p>
]]></content:encoded>
<author>me@madole.dev (Andrew McDowell)</author>
</item>
Expand Down

0 comments on commit a5e3d3f

Please sign in to comment.