mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 11:03:50 +00:00
Update dependencies; add scripts submodule
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "src/public/scripts"]
|
||||||
|
path = src/public/scripts
|
||||||
|
url = https://github.com/timmypidashev/scripts
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"react": "^18.3.1",
|
|
||||||
"react-dom": "^18.3.1",
|
|
||||||
"@types/react": "^18.3.12",
|
|
||||||
"@types/react-dom": "^18.3.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
90
pnpm-lock.yaml
generated
90
pnpm-lock.yaml
generated
@@ -1,90 +0,0 @@
|
|||||||
lockfileVersion: '9.0'
|
|
||||||
|
|
||||||
settings:
|
|
||||||
autoInstallPeers: true
|
|
||||||
excludeLinksFromLockfile: false
|
|
||||||
|
|
||||||
importers:
|
|
||||||
|
|
||||||
.:
|
|
||||||
dependencies:
|
|
||||||
'@types/react':
|
|
||||||
specifier: ^18.3.12
|
|
||||||
version: 18.3.12
|
|
||||||
'@types/react-dom':
|
|
||||||
specifier: ^18.3.1
|
|
||||||
version: 18.3.1
|
|
||||||
react:
|
|
||||||
specifier: ^18.3.1
|
|
||||||
version: 18.3.1
|
|
||||||
react-dom:
|
|
||||||
specifier: ^18.3.1
|
|
||||||
version: 18.3.1(react@18.3.1)
|
|
||||||
|
|
||||||
packages:
|
|
||||||
|
|
||||||
'@types/prop-types@15.7.13':
|
|
||||||
resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==}
|
|
||||||
|
|
||||||
'@types/react-dom@18.3.1':
|
|
||||||
resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==}
|
|
||||||
|
|
||||||
'@types/react@18.3.12':
|
|
||||||
resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==}
|
|
||||||
|
|
||||||
csstype@3.1.3:
|
|
||||||
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
|
|
||||||
|
|
||||||
js-tokens@4.0.0:
|
|
||||||
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
|
|
||||||
|
|
||||||
loose-envify@1.4.0:
|
|
||||||
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
react-dom@18.3.1:
|
|
||||||
resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
|
|
||||||
peerDependencies:
|
|
||||||
react: ^18.3.1
|
|
||||||
|
|
||||||
react@18.3.1:
|
|
||||||
resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
|
|
||||||
engines: {node: '>=0.10.0'}
|
|
||||||
|
|
||||||
scheduler@0.23.2:
|
|
||||||
resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
|
|
||||||
|
|
||||||
snapshots:
|
|
||||||
|
|
||||||
'@types/prop-types@15.7.13': {}
|
|
||||||
|
|
||||||
'@types/react-dom@18.3.1':
|
|
||||||
dependencies:
|
|
||||||
'@types/react': 18.3.12
|
|
||||||
|
|
||||||
'@types/react@18.3.12':
|
|
||||||
dependencies:
|
|
||||||
'@types/prop-types': 15.7.13
|
|
||||||
csstype: 3.1.3
|
|
||||||
|
|
||||||
csstype@3.1.3: {}
|
|
||||||
|
|
||||||
js-tokens@4.0.0: {}
|
|
||||||
|
|
||||||
loose-envify@1.4.0:
|
|
||||||
dependencies:
|
|
||||||
js-tokens: 4.0.0
|
|
||||||
|
|
||||||
react-dom@18.3.1(react@18.3.1):
|
|
||||||
dependencies:
|
|
||||||
loose-envify: 1.4.0
|
|
||||||
react: 18.3.1
|
|
||||||
scheduler: 0.23.2
|
|
||||||
|
|
||||||
react@18.3.1:
|
|
||||||
dependencies:
|
|
||||||
loose-envify: 1.4.0
|
|
||||||
|
|
||||||
scheduler@0.23.2:
|
|
||||||
dependencies:
|
|
||||||
loose-envify: 1.4.0
|
|
||||||
@@ -8,37 +8,37 @@
|
|||||||
"preview": "astro preview"
|
"preview": "astro preview"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@astrojs/react": "^4.2.1",
|
"@astrojs/react": "^4.2.3",
|
||||||
"@astrojs/tailwind": "^6.0.0",
|
"@astrojs/tailwind": "^6.0.2",
|
||||||
"@tailwindcss/typography": "^0.5.16",
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"@types/react": "^18.3.18",
|
"@types/react": "^18.3.20",
|
||||||
"@types/react-dom": "^18.3.5",
|
"@types/react-dom": "^18.3.6",
|
||||||
"astro": "^5.4.2",
|
"astro": "^5.6.1",
|
||||||
"prisma": "^6.3.1",
|
"prisma": "^6.6.0",
|
||||||
"tailwindcss": "^3.4.17"
|
"tailwindcss": "^3.4.17"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/mdx": "^4.1.0",
|
"@astrojs/mdx": "^4.2.3",
|
||||||
"@astrojs/node": "^9.1.2",
|
"@astrojs/node": "^9.1.3",
|
||||||
"@astrojs/rss": "^4.0.11",
|
"@astrojs/rss": "^4.0.11",
|
||||||
"@astrojs/sitemap": "^3.2.1",
|
"@astrojs/sitemap": "^3.3.0",
|
||||||
"@oslojs/crypto": "^1.0.1",
|
"@oslojs/crypto": "^1.0.1",
|
||||||
"@oslojs/encoding": "^1.1.0",
|
"@oslojs/encoding": "^1.1.0",
|
||||||
"@pilcrowjs/object-parser": "^0.0.4",
|
"@pilcrowjs/object-parser": "^0.0.4",
|
||||||
"@prisma/client": "^6.3.1",
|
"@prisma/client": "^6.6.0",
|
||||||
"@react-hook/intersection-observer": "^3.1.2",
|
"@react-hook/intersection-observer": "^3.1.2",
|
||||||
"@react-three/drei": "^9.121.4",
|
"@react-three/drei": "^9.122.0",
|
||||||
"@react-three/fiber": "^8.17.14",
|
"@react-three/fiber": "^8.18.0",
|
||||||
"arctic": "^3.2.4",
|
"arctic": "^3.6.0",
|
||||||
"lucide-react": "^0.468.0",
|
"lucide-react": "^0.468.0",
|
||||||
"marked": "^15.0.6",
|
"marked": "^15.0.8",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"react-responsive": "^10.0.0",
|
"react-responsive": "^10.0.1",
|
||||||
"reading-time": "^1.5.0",
|
"reading-time": "^1.5.0",
|
||||||
"rehype-pretty-code": "^0.14.0",
|
"rehype-pretty-code": "^0.14.1",
|
||||||
"rehype-slug": "^6.0.0",
|
"rehype-slug": "^6.0.0",
|
||||||
"schema-dts": "^1.1.2",
|
"schema-dts": "^1.1.5",
|
||||||
"sha2": "link:@oslojs/crypto/sha2",
|
"sha2": "link:@oslojs/crypto/sha2",
|
||||||
"three": "^0.172.0",
|
"three": "^0.172.0",
|
||||||
"typewriter-effect": "^2.21.0"
|
"typewriter-effect": "^2.21.0"
|
||||||
|
|||||||
1865
src/pnpm-lock.yaml
generated
1865
src/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
5
src/pnpm-workspace.yaml
Normal file
5
src/pnpm-workspace.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
onlyBuiltDependencies:
|
||||||
|
- '@prisma/client'
|
||||||
|
- '@prisma/engines'
|
||||||
|
- esbuild
|
||||||
|
- prisma
|
||||||
BIN
src/public/blog/thinkpad-t440p-coreboot-guide/thumbnail.png
Normal file
BIN
src/public/blog/thinkpad-t440p-coreboot-guide/thumbnail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
BIN
src/public/blog/thinkpad-t440p-modification-guide/thumbnail.png
Normal file
BIN
src/public/blog/thinkpad-t440p-modification-guide/thumbnail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 235 KiB |
1
src/public/scripts
Submodule
1
src/public/scripts
Submodule
Submodule src/public/scripts added at b555dc1e10
26
src/schema.prisma
Normal file
26
src/schema.prisma
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// schemas/prisma.schema
|
||||||
|
generator client {
|
||||||
|
provider = "prisma-client-js"
|
||||||
|
}
|
||||||
|
|
||||||
|
datasource db {
|
||||||
|
provider = "postgresql" // or "mysql" or "sqlite" depending on your database
|
||||||
|
url = env("DATABASE_URL")
|
||||||
|
}
|
||||||
|
|
||||||
|
model User {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
githubId Int @unique @map("github_id")
|
||||||
|
email String @unique
|
||||||
|
username String
|
||||||
|
sessions Session[]
|
||||||
|
|
||||||
|
@@index([githubId])
|
||||||
|
}
|
||||||
|
|
||||||
|
model Session {
|
||||||
|
id String @id
|
||||||
|
userId Int @map("user_id")
|
||||||
|
expiresAt DateTime @map("expires_at")
|
||||||
|
user User @relation(fields: [userId], references: [id])
|
||||||
|
}
|
||||||
8
src/src/content/blog/thinkpad-t440p-coreboot-guide.mdx
Normal file
8
src/src/content/blog/thinkpad-t440p-coreboot-guide.mdx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Thinkpad T440p Coreboot Guide
|
||||||
|
description: The definitive guide on corebooting a Thinkpad T440p
|
||||||
|
author: Timothy Pidashev
|
||||||
|
tags: [t440p, coreboot, thinkpad]
|
||||||
|
date: 2025-01-15
|
||||||
|
image: "/blog/thinkpad-t440p-coreboot-guide/thumbnail.png"
|
||||||
|
---
|
||||||
86
src/src/content/blog/thinkpad-t440p-modification-guide.mdx
Normal file
86
src/src/content/blog/thinkpad-t440p-modification-guide.mdx
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
---
|
||||||
|
title: Thinkpad T440p Modification Guide
|
||||||
|
description: You purchased a T440p, now what?
|
||||||
|
author: Timothy Pidashev
|
||||||
|
tags: [t440p, mods, coreboot, thinkpad]
|
||||||
|
date: 2025-01-15
|
||||||
|
image: "/blog/thinkpad-t440p-modification-guide/thumbnail.png"
|
||||||
|
---
|
||||||
|
|
||||||
|
## The T440p
|
||||||
|
|
||||||
|
Whether for privacy related reasons, coreboot, or someones advice on the internet,
|
||||||
|
you are now the proud owner of a T440p. Now what? Well, I have been daily driving
|
||||||
|
this laptop for over two years now, and would like to share my knowledge on this
|
||||||
|
lovely machine. If followed properly, this guide should help any privacy seeking
|
||||||
|
individual or programmer how to setup the "reasonably" perfect T440p.
|
||||||
|
|
||||||
|
## Buying the Right Model
|
||||||
|
|
||||||
|
Although the T440p comes in various configurations and specs, when searching for
|
||||||
|
one online there are two things to consider.
|
||||||
|
|
||||||
|
1. Online Marketplace
|
||||||
|
* Purchasing from the right marketplace is important to consider, and while trusted
|
||||||
|
vendors like Amazon might be preferred, consider Ebay or AliExpress.
|
||||||
|
|
||||||
|
* I personally have only purchased my thinkpad's on Ebay, as there are generally more listings
|
||||||
|
available from companies reselling retired units, usually at a steep discount.
|
||||||
|
|
||||||
|
|
||||||
|
2. Dedicated GPU
|
||||||
|
* The T440p motherboard comes in two different varieties, one with
|
||||||
|
a dGPU and the other without. There is only one dGPU model, which is the NVIDIA GT 730M.
|
||||||
|
Featuring 2GB of VRAM, it will work, however if your looking for longer battery life and
|
||||||
|
an easier coreboot config should you choose to coreboot, I would recommend sticking to
|
||||||
|
a non dGPU variant.
|
||||||
|
|
||||||
|
* Finding a dGPU variant is quite difficult, as many online
|
||||||
|
sellers don't always list the motherboard spec, making things quite the guessing game.
|
||||||
|
When I was shopping for one, my strategy was to purchase the dGPU motherboard on its own,
|
||||||
|
and then a T440p laptop listed with a dead motherboard, as I was going to swap it out anyways.
|
||||||
|
|
||||||
|
3. Quality
|
||||||
|
* Finding the perfect T440p is hard, and you will likely end up purchasing one that looks ok
|
||||||
|
in pictures, but comes with a cracked palmrest or front panel. Consider purchasing one which
|
||||||
|
looks good, and then replacing any cracked or aged parts should you choose to do so in the future.
|
||||||
|
|
||||||
|
* T440p plastics are aged. Although this machine is an absolute brick, which can probably be thrown
|
||||||
|
at the ground without any major damage, it will definitely chip and crack. I myself have replaced my
|
||||||
|
palm rest/keyboard cover thrice, as every half a year or so I will open the laptop in the morning to
|
||||||
|
find that my careless "throw it in the backpack" has finally cracked the palmrest yet again.
|
||||||
|
|
||||||
|
## Screen
|
||||||
|
|
||||||
|
When it comes to the screen, you really don't want to get one of poor quality, especially since the
|
||||||
|
lousy 1366x768 panel is not great nowadays. Generally, I would recommend going for an ips 1080p panel,
|
||||||
|
as this is generally most the most supported. I purchased this panel from amazon for ~$60USD and have
|
||||||
|
never looked back.
|
||||||
|
|
||||||
|
## Keyboard
|
||||||
|
|
||||||
|
## Trackpad
|
||||||
|
|
||||||
|
## Battery
|
||||||
|
|
||||||
|
## CPU
|
||||||
|
|
||||||
|
The T440p has a trick up its sleeve. The processor can be swapped out and replaced, allowing for an upgrade!
|
||||||
|
There are many models out there, however some aren't recommended due to thermal constraints, so finding the
|
||||||
|
right balance can be tough.
|
||||||
|
|
||||||
|
## RAM
|
||||||
|
|
||||||
|
## Storage
|
||||||
|
|
||||||
|
## WLAN
|
||||||
|
|
||||||
|
## WAN
|
||||||
|
|
||||||
|
## MISC
|
||||||
|
|
||||||
|
1. Fingerprint Reader
|
||||||
|
|
||||||
|
2. Disc Reader
|
||||||
|
|
||||||
|
3. Webcam & Microphone
|
||||||
8
src/src/lib/db.ts
Normal file
8
src/src/lib/db.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { PrismaClient } from "@prisma/client";
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
var prisma: PrismaClient | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const db = globalThis.prisma || new PrismaClient();
|
||||||
|
globalThis.prisma = db;
|
||||||
@@ -1,34 +1,34 @@
|
|||||||
---
|
---
|
||||||
import { CollectionEntry, getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
import { Image } from "astro:assets";
|
import { Image } from "astro:assets";
|
||||||
import ContentLayout from "@/layouts/content.astro";
|
import ContentLayout from "@/layouts/content.astro";
|
||||||
import { getArticleSchema } from "@/lib/structuredData";
|
import { getArticleSchema } from "@/lib/structuredData";
|
||||||
import { blogWebsite } from "@/lib/structuredData";
|
import { blogWebsite } from "@/lib/structuredData";
|
||||||
|
|
||||||
interface Props {
|
// This is a dynamic route in SSR mode
|
||||||
post: CollectionEntry<"blog">;
|
const { slug } = Astro.params;
|
||||||
|
|
||||||
|
// Fetch blog posts
|
||||||
|
const posts = await getCollection("blog");
|
||||||
|
const post = posts.find(post => post.slug === slug);
|
||||||
|
|
||||||
|
if (!post) {
|
||||||
|
return new Response(null, {
|
||||||
|
status: 404,
|
||||||
|
statusText: 'Not found'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
// Dynamically render the content
|
||||||
const posts = await getCollection("blog");
|
const { Content } = await post.render();
|
||||||
return posts.map((post) => ({
|
|
||||||
params: { slug: post.slug },
|
// Format the date
|
||||||
props: {
|
const formattedDate = new Date(post.data.date).toLocaleDateString("en-US", {
|
||||||
...post,
|
|
||||||
data: {
|
|
||||||
...post.data,
|
|
||||||
date: post.data.date.toLocaleDateString("en-US", {
|
|
||||||
year: "numeric",
|
year: "numeric",
|
||||||
month: "long",
|
month: "long",
|
||||||
day: "numeric"
|
day: "numeric"
|
||||||
})
|
});
|
||||||
}
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
const post = Astro.props;
|
|
||||||
const { Content } = await post.render();
|
|
||||||
const articleStructuredData = getArticleSchema(post);
|
const articleStructuredData = getArticleSchema(post);
|
||||||
|
|
||||||
const breadcrumbsStructuredData = {
|
const breadcrumbsStructuredData = {
|
||||||
@@ -81,8 +81,8 @@ const jsonLd = {
|
|||||||
<div class="flex flex-wrap items-center gap-2 md:gap-3 text-sm md:text-base text-foreground/80">
|
<div class="flex flex-wrap items-center gap-2 md:gap-3 text-sm md:text-base text-foreground/80">
|
||||||
<span class="text-orange">{post.data.author}</span>
|
<span class="text-orange">{post.data.author}</span>
|
||||||
<span class="text-foreground/50">•</span>
|
<span class="text-foreground/50">•</span>
|
||||||
<time dateTime={post.data.date} class="text-blue">
|
<time dateTime={post.data.date instanceof Date ? post.data.date.toISOString() : post.data.date} class="text-blue">
|
||||||
{post.data.date}
|
{formattedDate}
|
||||||
</time>
|
</time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user