Sign in

DerpyCoder

@derpycoder.bsky.social
155 followers 288 following 278 posts

Engineer by Passion Backend + Frontend #golang, #templ, #tailwindcss, #alpinejs, #htmx Database #clickhouse, #sqlite Devops #kubernetes, #taloslinux, #hetzner Workhorse #nvim, #zellij, #wezterm, #starship #selfhosting, #indiehacking, #microsaas

PostsRepliesMedia
DerpyCoder @derpycoder.bsky.social · 17/01/2025
Here's how I am doing the routing. I am using Echo framework, not the stdlib router.
120
DerpyCoder @derpycoder.bsky.social · 17/01/2025
Also, seeing internal server errors.
000
DerpyCoder @derpycoder.bsky.social · 07/01/2025
This is what I tried as well. Which added to my confusion as well. This vs Form vs JS vs Cookies.
CSRF Token with HTMX
110
DerpyCoder @derpycoder.bsky.social · 21/12/2024
@psionicalch.bsky.social, are you using #templ? I'm running into a wall, when I'm trying to do dynamic values for the Critical CSS at the top of a layout page. I'm unable to use the templating syntax inside style tags. Any workaround or suggestions? Without this, fonts flicker!
210
DerpyCoder @derpycoder.bsky.social · 12/12/2024
Hey guys, this is what I post about! @blueskywordcloud.com
140
DerpyCoder @derpycoder.bsky.social · 12/12/2024
It’s sorted now, I was able to see and generate the word cloud! BTW, this info is really useful to see whom to follow or unfollow! I accidentally followed a lot of people, who talk about politics or marketing or not at all and this summarises their activity so well.
100
DerpyCoder @derpycoder.bsky.social · 12/12/2024
Awesome, although it’s not opening for me! Also the graphics for tracking visitors look cool, did you build your own analytics? Or is it another tool?
100
DerpyCoder @derpycoder.bsky.social · 11/12/2024
Anyone from #golang or #libvips know how to track actual image processing progress? I am just shamelessly sending numbers down the #sse throat!
150
DerpyCoder @derpycoder.bsky.social · 11/12/2024
Bluesky video upload limit is annoying, so I read around to find out the best format and how to reduce the size of my videos. Here's the magic incantation: `ffmpeg -i input.mp4 -vcodec libx264 -crf 20 -preset medium -acodec aac -b:a 128k output.mp4` This got my video from 181 Mb down to 852 Kb!
361
DerpyCoder @derpycoder.bsky.social · 11/12/2024
#sse rocks!, I am using server sent events, to push image processing events down to the client. #echo + #golang makes it so easy. Here it is in action:
120
DerpyCoder @derpycoder.bsky.social · 10/12/2024
I got everything right, with asset loading and what not, My custom Asset Pipeline helped me achieve this perfect score. Along with Brotli, Cache-Control Immutable, Client Hints, Highway Hash, Text Minification! Now, how do I reduce the TTFB? Anyone? Varnish or CDN? For MVP? Also, #golang rocks!!
Page Speed Index MobilePage Speed Index DesktopAll Assets Optimally Loaded
170
DerpyCoder @derpycoder.bsky.social · 10/12/2024
Here's the before and after of my Docker image!
Fat Docker ImageSlim Docker Image
010
DerpyCoder @derpycoder.bsky.social · 10/12/2024
P.S. It says 404 not found when I tried to visit your site!
110
DerpyCoder @derpycoder.bsky.social · 09/12/2024
Here's the #chroma playground: #golang rocks! swapoff.org/chroma/playg...
010
DerpyCoder @derpycoder.bsky.social · 09/12/2024
Yay, Asset Pipeline is shaping up nicely. Todo: - [ ] PNG/WebP/AVIF conversions, with different sizes - [ ] Snippets with dynamic styling & lexers - [ ] Import Maps, perhaps in `gob`, so the imports in #templ can be dynamic - [ ] ffmpeg for gif or videos - [ ] Changing imports to use hash #golang
Golang Asset Pipeline.
150
DerpyCoder @derpycoder.bsky.social · 09/12/2024
Here's a before and after! Then I can embed the generated URL, like we do with GitHub gists.
000
DerpyCoder @derpycoder.bsky.social · 08/12/2024
Look at the minified and brotlified file sizes! Users will thank me! User's ISPs will thank me! #hetzner 's reduced bandwidth will thank me! #golang rocks!
Files after minification & brotlification!
120
DerpyCoder @derpycoder.bsky.social · 07/12/2024
I am big believer of Locality of Behavior, so I like keeping things together, that belong together. Instead of splitting things apart, like css in separate file, javascript, in separate. Or in case of MVC, model in separate directory, view in separate. I keep the things together.
Golang Project Structure.App Directory.
020
DerpyCoder @derpycoder.bsky.social · 05/12/2024
At least client hints can mask that initial latency apart from TTFB - Time to First Byte.
030
DerpyCoder @derpycoder.bsky.social · 05/12/2024
Hehe
040
DerpyCoder @derpycoder.bsky.social · 05/12/2024
I just spent some time implementing ETag based caching, just to see Turtles next to files being downloaded. It's true that asking server "Has this changed?" and receiving "304 Not Modified" response is a lot smaller compared to a full blown file. But, it's still a network roundtrip!!
130
DerpyCoder @derpycoder.bsky.social · 05/12/2024
It’s incredible how marketing convinced “Programmers” to not touch servers. I too got caught up in this mindset. Heck, non techie people can self host, and somehow programmers can’t!
120
DerpyCoder @derpycoder.bsky.social · 05/12/2024
I checked out your website. I see some CSS issues!
120
DerpyCoder @derpycoder.bsky.social · 05/12/2024
Here's my terminal, I have been working on: I'm collecting all TUIs, and actively avoiding bloat-wares on my Mac. #taloslinux, #k9s, #nvim
8141
DerpyCoder @derpycoder.bsky.social · 05/12/2024
How many of you tried the Hetzner Object Store, that coincidentally became public just after I opened up an account!! #hetzner
020
DerpyCoder @derpycoder.bsky.social · 04/12/2024
I love #taloslinux. But where’s the Catppuccin theme for the dashboard? I want to show off the talos dashboard alongside my other TUIs!!
120
DerpyCoder @derpycoder.bsky.social · 04/12/2024
Here's my best work yet. I used ServerSentEvents for updating the progress on image conversion. However I don't know how to get actual progress! The thread pool just keeps sending numbers down to the website. 😅 Here's my take on JPG to PNG conversion on the web. #golang, #htmx, #templ, #alpinejs
230
DerpyCoder @derpycoder.bsky.social · 04/12/2024
Here's how #sqlite table looks after some shuffling.
LexoRank, representation on a Sqlite db.
010
DerpyCoder @derpycoder.bsky.social · 04/12/2024
Todo Lists are boring, so I made it sortable. Initially I thought about using floats as sort order, but soon discovered floating-point errors. I came across LexoRank algo, that engineers at Atlassian came up with, and here's the result. #golang, #lexorank, #sqlite, #htmx, #alpinejs, #tailwindcss
3110
DerpyCoder @derpycoder.bsky.social · 04/12/2024
Made a Todo page, without using React.js, or any associated headaches with client routing, client side state, client side API calls, ... #golang, #templ, #tailwindcss, #htmx, #alpinejs
181
DerpyCoder @derpycoder.bsky.social · 04/12/2024
What is up with the pop ups and pop ins on all websites these days. It’s infuriating. Look at this “dev.to” site, I hate having to click the x button. I can’t eve close this pop up by pressing Esc!!
A developer centric website, with non developer friendly pop ups.
220