Skip to content

Instantly share code, notes, and snippets.

View baxiry's full-sized avatar
🏠
Working from home

baxiry baxiry

🏠
Working from home
View GitHub Profile
// this is under the user.go file
func (h *Handler) loginUser(c echo.Context) error {
username := c.FormValue("username")
password := c.FormValue("password")
user := h.service.GetByUsername(username)
if user == nil || user.Password != password {
return echo.ErrUnauthorized
}
@ityonemo
ityonemo / test.md
Last active May 10, 2025 18:28
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)