TDiblik
|
1 year ago
|
on: Automatically generate swagger files from Golang fiber code
Hey, I would like to get some feedback on the library I'm developing for fiber v3. It basically automatically generates swagger.yaml + swagger.json + swagger editor ui from your fiber routes.
It can automatically generate the route + the route path parameters. If you wanna provide more info, I've created a simple interface that wraps the fiber's router and isn't too annoying ... or you can use `gofiberswagger.RegisterRoute()` to add the definition on your own (without touching the existing code).
The library uses reexported github.com/getkin/kin-openapi types, that means that you can specify ANY openapi field you wanna (not only in routes, but also in the general config, eg. auth / security schemes / title / openapi version / etc).
I've implemented it into some of my personal projects and tbh I love it, that's why I decided to share it with y'all. I know about swaggo/swag, however I don't like how my code looks while using it.
I've created some basic examples inside the `/examples/` folder, so be sure to check them out! Any feedback would be appreciated.
TDiblik
|
1 year ago
|
on: My VM is lighter (and safer) than your container (2017)
First thing that comes to mind is the need to link against libraries across platforms. Imagine that my app depends on opencv, if I wanted to statically link everything on my Windows machine, I need to compile opencv for Linux on my windows machine (or use pre-compiled binaries). Also, if you link against libraries dynamicaly, it's likely you can compile them on the host machine (or in a container) with more optimizations enabled. And the last thing is probably the ability to "freeze" the whole "system" environment (like folders, permissions, versions of system libraries).
Personally, I use containers to quickly spin-up different database servers for development or as an easy way of deployment to a cloud service...
TDiblik
|
2 years ago
|
on: More than 80 AI models from Qualcomm
In theory, you must have written some code to train the models + download the data ... just openning this code + adding logging to store the sources trained on, you could achieve trully "open source" (anybody can now go and scrape + train the same way you did and achieve the same outcome/model)
I'm not saying "opening models is bad", it's good. However imo it would be nice to have a semantic way to differentiate between those two
TDiblik
|
2 years ago
|
on: Ask HN: What are good books/blogs to read for a first time CTO?
Depends on what you're into:
romance: i would suggest "Looking for Alaska" by John Green or "Pierre et Luce" by Romain Rolland
fantasy: The Way Of Kings by Brandon Sanderson or "Blackout" by Marc Elseberg
life advice ig?: "The Algebra of Happiness" by Scott Galloway
... never been a CTO xd
TDiblik
|
2 years ago
|
on: Show HN: Advent of Code CLI
the first usecase I thought about was the tryhards that want to save every second :D ... idk there could be a legitimate usecase
TDiblik
|
2 years ago
|
on: A coder considers the waning days of the craft
as a high school student, I'm more hesitant to go into CS degree not because of chatgpt but because it is constantly marketed as a high income job and A LOT of people are choosing/learning it. I wonder if it's gonna be the same in 10 years or so. Chatgpt/copilot make stuff easier and there are only so much CRUD apps to be made :/
TDiblik
|
2 years ago
|
on: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App
hi ^^, limited knowledge as well, however I'm pretty sure the issue is that Harvest allows all urls to be used as callback urls. You should tell microsoft to allow only certain urls as callbacks. eg, when setting up the workflow, they probably used a wildcard as an allow list of callback urls, instead of creating an actual list of trusted callback urls. I think that's what's happening here, could be totally wrong tho :D
TDiblik
|
2 years ago
|
on: Ask HN: Show me your half baked project
TDiblik
|
2 years ago
|
on: GitHub education pack requesting real name on public profile
Yep, few of my classmates had a problem with it. Just change your name temporarily and then change it back :/ ... sucks but works atm
TDiblik
|
2 years ago
Open your eyes, look up to the skies and seeeeeeee
TDiblik
|
2 years ago
|
on: Ask HN: Please recommend me an NSFW content detection API
TDiblik
|
2 years ago
|
on: Astro: All-in-one web framework designed for speed
Personally, I really like svelte. Either use a bundler + js library for redirects OR SvelteKit with static adapter (
https://kit.svelte.dev/docs/adapter-static). Fyi I use the latter since it's easier to setup and bit more trouble-free to use overall :D
TDiblik
|
2 years ago
|
on: Blade-Runner-Tailwind: A Collection of Blade Runner Themed Tailwind Components
Want to get a job => learn React
Want to have fun => learn Svelte
There are a lot of tutorials, but I found following the docs is the most straight forward.
If you're interested in frontend/full-stack development state atm, check out "Theo (ping.gg)" on youtube.
TDiblik
|
2 years ago
|
on: Expo – Open-source platform for making universal apps for Android, iOS, and web
Yeah, afaik, in the old template version `npm run export` activated the `expo export` and THAT got deprecated (recently), however at the time (about half a year ago) I thought that the `--local` flag was getting deprecated. Sorry, that was a huge misunderstanding on my end!
TDiblik
|
2 years ago
|
on: Expo – Open-source platform for making universal apps for Android, iOS, and web
yes, you are right, however, AFAIK you still need to be logged + have it linked to eas project (because it uses eas credentials) + this method is planned to be deprecated soon [?] (I'm 100% sure I read stuff like this when researching it like half a year ago, but cannot find it for the love-of-god atm :D, but I would like to be proved otherwise, because the build step is the only thing I disliked about expo long-term wise)
... now looking more into it, I probably mistook `npm run export` / `expo build` with `eas build --local`. Is this correct?
TDiblik
|
2 years ago
|
on: Expo – Open-source platform for making universal apps for Android, iOS, and web
Tbh, I liked expo, but since you cannot build locally nowdays (you can eject and build, but that won't work 99% of the time, literally didn't work for me on the hello world example), I kinda just threw it in the "cool, but won't use" bucket for time beeing :/, could change in the future, but I don't know how I feel about 3d party service (EAS) building my app and holding my signing certificates (yet)
TDiblik
|
2 years ago
|
on: Why Host in Kosovo?
TIL HN does not support emojis, so the original comment lost the desired meaning :(
TDiblik
|
2 years ago
|
on: Why Host in Kosovo?
"If I would ..."
TDiblik
|
2 years ago
|
on: The Nano ESP32
chip on it, e-ink display sawthered on and etc, just get me from my prototype to a full on product. Basically, I want to advance my skills to the next level, but I struggle to find how :/ .... you seem to have experience in this kind of stuff, could you please answear some of these questions?
Ps: accidentally posted before I finished the comment and using mobile client without ability to edit comments :d
Ps2: these comments are kinda out of context, but it's something that's bothering me for more than a month now.
TDiblik
|
2 years ago
|
on: The Nano ESP32
Hi, just asking, I'm interested in embedded but as an outsider I fail to understand how would I go about making custom board? I googled a lot, but I still fail to grasp how do you make the board? How do you program the chip? How can you test your board? How can you prototype on an arduino, if you'll use different architecture STM vs Atmega, etc...
I've done some arduino projects using VSCode and Platformio and I want to level up my skill level, however I've been struggling to find a resources that goes throught the process of actually making the product from scratch (starts with nothing and ends with a programmed product on custom board). For example, I have this project of mine where I make smart watches using an arduino and e-ink paper display. I would like to read / watch a resource where I learn to design a board that has custom STM32
It can automatically generate the route + the route path parameters. If you wanna provide more info, I've created a simple interface that wraps the fiber's router and isn't too annoying ... or you can use `gofiberswagger.RegisterRoute()` to add the definition on your own (without touching the existing code).
The library uses reexported github.com/getkin/kin-openapi types, that means that you can specify ANY openapi field you wanna (not only in routes, but also in the general config, eg. auth / security schemes / title / openapi version / etc).
I've implemented it into some of my personal projects and tbh I love it, that's why I decided to share it with y'all. I know about swaggo/swag, however I don't like how my code looks while using it.
I've created some basic examples inside the `/examples/` folder, so be sure to check them out! Any feedback would be appreciated.