lena

joined 5 months ago
MODERATOR OF
[–] [email protected] 2 points 6 days ago

Hfjfjfhfjfhfhfjfjfjfhfifjrhrkrhtj why doesn't this happen :(

[–] [email protected] 2 points 6 days ago

Thank you for your contribution to the discussion, BigBenis

[–] [email protected] 5 points 6 days ago (1 children)

Huh, TIL. What's the difference between a handrail and a bannister?

[–] [email protected] 10 points 1 week ago

If conservatives manage to get rid of all trans people the IT industry will crumble

[–] [email protected] 1 points 1 week ago

You can provide binaries and release the source code.

[–] [email protected] 1 points 1 week ago (2 children)

You can build binaries so that users don't have to touch any code (and potential spoilers).

[–] [email protected] 5 points 1 week ago (4 children)

I think it's reasonable to assume that most players won't go through the source code. Those that do probably have a reason for it, such as wanting to improve the game. You could simply provide binaries.

If you don't want to do that that's fine, it's your game after all.

[–] [email protected] 9 points 1 week ago (7 children)

This seems really interesting, please keep us updated! Do you plan on open sourcing it?

I'm working on an even less wholesome software, a digital dead man switch. It'll send the user an email each month with a confirmation link in it, and if they don't click it for a few months, they are marked as dead and predefined last messages are sent to recipients via email (or another platform if I'll have the time to add it). It's also open source and self-hostable.

[–] [email protected] 1 points 1 week ago

Ewwphoria-inducing

[–] [email protected] 6 points 1 week ago

Blasphemy! A Lemmy user doesn't know how large a blahaj is!

On a more serious note, about 1 meter.

 
 

Cross-posted from "How could I allow users to schedule sending emails at a specific interval?" by @[email protected] in [email protected]


Basically, I'm trying to figure out how I could allow a user to send a schedule in the cron syntax to some API, store it into the database and then send an email to them at that interval. The code is at gragorther/epigo. I'd use go-mail to send the mails.

I found stuff like River or Asynq to schedule tasks, but that is quite complex and I have absolutely no idea what the best way to implement it would be, so help with that is appreciated <3

 

Cross-posted from "How could I allow users to schedule sending emails at a specific interval?" by @[email protected] in [email protected]


Basically, I'm trying to figure out how I could allow a user to send a schedule in the cron syntax to some API, store it into the database and then send an email to them at that interval. The code is at gragorther/epigo. I'd use go-mail to send the mails.

I found stuff like River or Asynq to schedule tasks, but that is quite complex and I have absolutely no idea what the best way to implement it would be, so help with that is appreciated <3

 

Basically, I'm trying to figure out how I could allow a user to send a schedule in the cron syntax to some API, store it into the database and then send an email to them at that interval. The code is at gragorther/epigo. I'd use go-mail to send the mails.

I found stuff like River or Asynq to schedule tasks, but that is quite complex and I have absolutely no idea what the best way to implement it would be, so help with that is appreciated <3

 

cross-posted from: https://gregtech.eu/post/14553400

Moth girls rule

 
 

I mean, it's just a specific collection of noises that somehow tingles our brains.

I assume it's because we are great at recognizing patterns, and music is just that - patterns.

 
 
 
 

Cross-posted from "What would be the best way to store the country of a user in SQL?" by @[email protected] in [email protected]


I use Gorm. This is the current code:

package main

import (
	"fmt"
	"log"

	"gorm.io/driver/sqlite"
	"gorm.io/gorm"
)

type Env struct {
	DB     *gorm.DB
	Logger *log.Logger
}

type User struct {
	ID           uint
	Username     string
	Name         string
	Email        string
	PasswordHash string
	Country      string //should probably be a foreign key of another table
}

func initDB() {
	env := &Env{}
	db, err := gorm.Open(sqlite.Open("gorm.db"), &gorm.Config{})
	if err != nil {
		fmt.Printf("Error opening database: %v", err)
		return
	}
	env.DB = db
	env.DB.AutoMigrate(&User{})

}

func main() {
	initDB()
}

As you can see in the comment in the code, I assume the best way would be to have a table of countries and then assign each user to one via a foreign key. However, it seems a bit cumbersome to manually create a list of all countries. Is there a better way to do this?

view more: ‹ prev next ›