Jochem
KPCKevin Powell - Community
•Created by Jochem on 5/16/2024 in #resources
Build a framework from scratch
Linked by @ErickO, an article with a really fancy code display and an in-depth walkthrough on how to build a react-like framework from scratch, including excellent explanations on how and why certain things work like they do:
https://pomb.us/build-your-own-react/
1 replies
KPCKevin Powell - Community
•Created by Jochem on 11/25/2023 in #resources
How To Build Your Own <blank>
https://github.com/codecrafters-io/build-your-own-x
This is a list of tutorials and write ups on how to build any number of harder-to-break-down projects, from a BitTorrent Client, to Git implementations, to Frameworks and games and template engines and any number of other things. Lots of them include implementations in JavaScript, though there's also a ton of info about other languages.
1 replies
KPCKevin Powell - Community
•Created by Jochem on 11/12/2023 in #resources
Why you usually don't need a NoSQL database (JSON in MySQL)
1 replies
KPCKevin Powell - Community
•Created by Jochem on 9/6/2023 in #resources
Useful article on REM
Server member @caiomarcellus posted this very useful article in #self-promotionthat gives a good explanation of rem and how it's not a magic bullet unit that makes your site responsive, definitely a good read: https://discord.com/channels/436251713830125568/709865075871186996/1146834577088843817
https://dev.to/marcelluscaio/using-rem-doesnt-make-your-website-responsive-heres-why-4b0e
4 replies
KPCKevin Powell - Community
•Created by Jochem on 7/22/2023 in #front-end
Update route parameter in SvelteKit
I'd like a quick sanity check. I've got a route in svelte,
/browse/[[page]]
. The page param is used for pagination. I've also got filters on the same route, and those are put into the searchParam, so a full URL might look like this:
When I apply filters, I use goto
to update the searchParams. Originally I had
That keeps you stuck on the page you're on, and your new potentially more specific filter might have fewer pages. Ideally, any new filter action would send you to page 1.
I could of course change the page parameter to also be a searchParam over a route parameter, but that would complicate setting the filter, so right now I'm doing this
which works just fine, but it feels hacky. I'm hoping I'm missing some helper function in Sveltekit that lets you modify a route and get a new path string to feed to goto
. I don't anticipate this causing problems down the line, I'm pretty sure this would work even for other routes (say a /admin/users/[[page]]
route) without modification, but it's not as smooth as I'd expect from sveltekit and that usually means I'm missing something.
So the question is, am I missing something? And while I'm posting anyway, is my current solution causing any code-related nausea in anyone?44 replies
KPCKevin Powell - Community
•Created by Jochem on 5/27/2023 in #os-and-tools
Raspbian NAS constant disk activity after extending LVM with new disk
I just added a second hard drive to my raspbian NAS (pi4 4GB), added it to the LVM storage volume, extended the filesystem (ext4). It's reporting the proper size and seems to be working just fine, but there's non-stop activity (the LED for the new drive is blinking and the drive is making accessing noises).
I'm hoping / assuming it's just some background process where the disk is getting... something'd? No idea what exactly... there's nothing special in
dmesg
(nothing since the ext4 expansion was done) or syslog, iotop
reports only known processes that are using the disk and it was doing the same thing before those were running
I ran pvcreate /dev/sda
(the new disk) to create a physical volume, vgextend storage /dev/sda
to add the new disk to the existing VG, then lvresize -l +100%free /dev/storage/storagelv
to extend the LV. resize2fs /dev/mapper/storage-storagelv
extended the ext4 filesystem, which took maybe 15 minutes and reported done.
I see jbd2/dm-0-8
pop up (as well as jbd2/mmcblk0p2-
, which is the sd-card iirc) occasionally, maybe once every 10 seconds, but the drive activity light is blinking on and off maybe 4x a second, and the drive is making noise in time with the light
Is this something to be worried about, or should I just wait a couple of days and see if it's some kind of background fsck or lvm process that's checking the disk without the activity being visible in iotop
?4 replies