[-] pe1uca@lemmy.pe1uca.dev 10 points 3 weeks ago

Good tip, just also good to remember there's no way to control the seed of the generator, for example for a seeded world.
For that use case you still need to manually run the generator you created with your seed to select an item.

[-] pe1uca@lemmy.pe1uca.dev 10 points 3 weeks ago

I can't imagine this flow working with any DB without an UI to manage it.
How are you going to store all that in an easy yet flexible way to handle all with SQL?

A table for notes?
What fields would it have? Probably just a text field.
Creating it is simple: insert "initial note"... How are you going to update it? A simple update to the ID won't work since you'll be replacing all the content, you'd need to query the note, copy it to a text editor and then copy it back to a query (don't forget to escape it).
Then probably you want to know which is your oldest note, so you need to include created_at and updated_at fields.
Maybe a title per note is a nice addition, so a new field to add title.

What about the todo lists? Will they be stored in the same notes table?
If so, then the same problem, how are you going to update them? Include new items, mark items as done, remove them, reorder them.
Maybe a dedicated table, well, two tables, list metadata and list items.
In metadata almost the same fields as notes, but description instead of text. The list items will have status and text.

Maybe you can reuse the todo tables for your book list and links/articles to read.

so that I can script its commands to create simpler abstractions, rather than writing out the full queries every time.

This already exists, several note taking apps which wrap around either the filesystem or a DB so you only have to worry about writing your ideas into them.
I'd suggest to not reinvent the wheel unless nothing satisfies you.

What are the pros of using a DB directly for your use case?
What are the cons of using a note taking app which will provide a text editor?

If you really really want to use a DB maybe look into https://github.com/zadam/trilium
It uses sqlite to store the notes, so maybe you can check the code and get an idea if it's complicated or not for you to manually replicate all of that.
If not, I'd also recommend obsidian, it stores the notes in md files, so you can open them with any software you want and they'll have a standard syntax.

[-] pe1uca@lemmy.pe1uca.dev 10 points 1 month ago

What? AI search in Firefox? Haven't seen it, tho I have a custom search engine.

How is the setting in brave related to Firefox?

[-] pe1uca@lemmy.pe1uca.dev 12 points 2 months ago

I'm just annoyed by the regions issues, you'll get pretty biased results depending in what region you select.
If you try to search for something specific to a region with other selected you'll find sometime empty results, which shows you won't get relevant results about a search if you don't properly select the region.

Probably this is more obvious with non technical searches, for example my default region is canada-en and if I try "instituto nacional electoral" I only get a wiki page, an international site and some other random sites with no news, only when I change the region I get the official page ine.mx and news. For me this means kagi hides results from other regions instead of just boosting the selected region's ones.

[-] pe1uca@lemmy.pe1uca.dev 10 points 3 months ago

Are you sure your IP is only used by you?
AFAIK ISPs usually bundle the traffic of users to a few public IP addresses, so maybe the things you see are just someone else in your area going out from the same IP your ISP provides.

But I'm not actually sure if this is how it works, I might be wrong.

[-] pe1uca@lemmy.pe1uca.dev 11 points 8 months ago

IIRC most stuff can be done with vanilla JS in any modern browser.
Although, I've been doing little front-end work, and mostly for personal projects, nothing fancy nor production ready, so someone might have another opinion about using jQuery.

[-] pe1uca@lemmy.pe1uca.dev 13 points 10 months ago

Here's one I've been playing with https://github.com/jhj0517/Whisper-WebUI
The small model of fast Whisper has been amazing for the 3 options it gives (files, YT, or recording), tho I have in mind the limitations and I've only used it with somewhat clear audio.

[-] pe1uca@lemmy.pe1uca.dev 12 points 10 months ago

I saw this project https://github.com/pablouser1/ProxiTok
Haven't been able to selfhost it (not sure what I'm doing wrong yet), but the public instances are working fine.

14
Custom voice input service (lemmy.pe1uca.dev)
submitted 11 months ago* (last edited 11 months ago) by pe1uca@lemmy.pe1uca.dev to c/android@lemmy.world

Is there any keyboard which lets you configure the service used for voice input?
I'd like to set an URL to a selfhosted service to send my voice to be processed which then will return the transcription.

If no keyboard exists for this any app would do.
The idea is the app lets you stream the audio to the given service and will receive the response and show it for you to edit, similar on how google keyboard has the voice input.

Bonus points if it's open source :P

6
submitted 11 months ago* (last edited 11 months ago) by pe1uca@lemmy.pe1uca.dev to c/programming@programming.dev

I'm not sure in which community to ask this, if you know of a better one let me know.

I already have squid proxy working, if I set up my browser or curl to use the proxy all sites work properly.
But when I try to make a request with axios it doesn't work.

Here are the logs of squid
The first two lines are successful google connections are from a browser.
The 3rd line is a successful to google using curl.
The 4th line is a successful to ipify using curl.
The last two ones are the ones from node using axios

squid_proxy  | 1693406310.165  12043 127.0.0.1 TCP_TUNNEL/200 56694 CONNECT www.google.com:443 - HIER_DIRECT/142.250.217.132 -
squid_proxy  | 1693406310.166  10681 127.0.0.1 TCP_TUNNEL/200 47267 CONNECT apis.google.com:443 - HIER_DIRECT/142.250.176.14 -
squid_proxy  | 1693406325.551    497 127.0.0.1 TCP_TUNNEL/200 24778 CONNECT www.google.com:443 - HIER_DIRECT/142.250.217.132 -
squid_proxy  | 1693406336.829    403 127.0.0.1 TCP_TUNNEL/200 7082 CONNECT api.ipify.org:443 - HIER_DIRECT/64.185.227.156 -
squid_proxy  | 1693406361.410  12590 127.0.0.1 TCP_MISS/503 4358 GET https://api.ipify.org/? - HIER_NONE/- text/html
squid_proxy  | 1693406361.889    385 127.0.0.1 TCP_MISS/502 3948 GET https://www.google.com/ - HIER_DIRECT/142.250.217.132 text/html

The errors sent to axios are these:

# ipify
[No Error] (TLS code: SQUID_TLS_ERR_CONNECT+GNUTLS_E_FATAL_ALERT_RECEIVED)
SSL handshake error (SQUID_TLS_ERR_CONNECT)  
This proxy and the remote host failed to negotiate a mutually acceptable security settings for handling your request. It is possible that the remote host does not support secure connections, or the proxy is not satisfied with the host security credentials.  

# google
The system returned: [No Error]

My code looks like this

const axios = new Axios({
	proxy: {
		host: proxyIP,
		port: proxyPort,
		protocol: 'http'
	}
});

const ip = await axios.get('https://api.ipify.org?format=json');
console.log(ip.data);


const res = await axios.get('https://www.google.com');
console.log(res.data);

Any idea what might be happening?

I'm not sure if axios handles the connection in a different way since the logs from the browser show CONNECT and axios shows GET, but maybe that's because it's failing to actually connect and it only logs the request method.

29

I have an implementation for an internal API, the requirement is to implement some sort of basic authentication instead of oauth (generating a token).

Do you think there's any difference between using just an API key vs using a client id + secret?
For what I see it'd be just like saying "using a password" vs "using a user and a password".

13
submitted 1 year ago* (last edited 1 year ago) by pe1uca@lemmy.pe1uca.dev to c/pcgaming@lemmy.ca

I just reinstalled windows in a new SSD and forgot to export in some way the settings for my logitech devices.
The old SSD is still around but it's cumbersome to run windows from there just to copy the settings, so I mounted with and adapter and to read the settings files.

The LGHUB storage is an sqlite DB located in C:\Users\<user>\AppData\Local\LGHUB\settings.db
And you can just query select * from data which contains the settings as a json.

It'd be better to send it to a file sqlite3 settings.db 'select file from data' > data.json (mine was 7.5MB of data)

[-] pe1uca@lemmy.pe1uca.dev 10 points 1 year ago

IIRC the removal of the upvote is also federated.
When you change it to a downvote you first need to remove the upvote, that's why it changed from 11 to 9.
So, in instances B and C you'll end up with 10 score.

30

I've been creating separate accounts for some of my selfhosted services, some are to further sub-divide the data, but for sure I always have an admin account and the account I use day to day.

What's your account creation schema?
What do you think about creating multiple accounts for your selfhosted services?

142

The bug allows attackers to swipe data from a CPU’s registers. […] the exploit doesn’t require physical hardware access and can be triggered by loading JavaScript on a malicious website.

88

The bug allows attackers to swipe data from a CPU's registers. [...] the exploit doesn't require physical hardware access and can be triggered by loading JavaScript on a malicious website.

3

I'm trying to install munin in my ubuntu VPS
I used apt install munin-node munin to install it.

But I can't make the web interface work.
Since I already have pihole there I'm using lighttpd with this config (for the most part the default from the documentation)

server.modules += ( "mod_alias" )
server.modules += ( "mod_fastcgi" )
server.modules += ( "mod_rewrite" )

$SERVER["socket"] == ":8467" {

alias.url += ( "/munin-static" => "/etc/munin/static" )
alias.url += ( "/munin"        => "/var/cache/munin/www/" )
server.document-root = "/var/cache/munin/www/"

fastcgi.server += ("/munin-cgi/munin-cgi-graph" =>
                   (( "socket"      => "/var/run/lighttpd/munin-cgi-graph.sock",
                      "bin-path"    => "/usr/lib/munin/cgi/munin-cgi-graph",
                      "check-local" => "disable",
                   )),
                  "/munin-cgi/munin-cgi-html" =>
                   (( "socket"      => "/var/run/lighttpd/munin-cgi-html.sock",
                      "bin-path"    => "/usr/lib/munin/cgi/munin-cgi-html",
                      "check-local" => "disable",
                   ))
                 )

url.rewrite-repeat-if-not-file += (
                   "/munin/(.*)" => "/munin-cgi/munin-cgi-html/$1",
                   "/munin-cgi/munin-cgi-html$" => "/munin-cgi/munin-cgi-html/",
                   )
}

When the service is restarted it the log shows this error even when the files have 777 permissions

(gw_backend.c.1404) invalid "bin-path" => "/usr/lib/munin/cgi/munin-cgi-graph" (check that file exists, is regular file, and is executable by lighttpd)
(gw_backend.c.1404) invalid "bin-path" => "/usr/lib/munin/cgi/munin-cgi-html" (check that file exists, is regular file, and is executable by lighttpd)

When I try to run a config with the command lighttpd -D -f /etc/munin/lighttpd.conf
The output is this

(gw_backend.c.324) child exited: 1 unix:/var/run/lighttpd/munin-cgi-html.sock-3
(gw_backend.c.468) unlink /var/run/lighttpd/munin-cgi-html.sock-3 after connect failed: Connection refused
(gw_backend.c.324) child exited: 1 unix:/var/run/lighttpd/munin-cgi-graph.sock-0
(gw_backend.c.468) unlink /var/run/lighttpd/munin-cgi-graph.sock-0 after connect failed: Connection refused

Do you guys have any clue what might be happening?

281

I've been putting off having a local copy of the series and movies I watch because I still can access them quickly and cheaply enough in some streaming service, I think it's time to plan ramping up my selfhosted setup.

16

I'm wondering what are the pros and cons about saddles with no nose like this one https://www.amazon.ca/Nose-Saddle-Comfort-Large-Bicycle/dp/B087ZBPFCH

My only thought is a bit about balance, I mean the nose can help you grip to the bike better with the thighs than trying to do it to the frame with the legs, specially for someone just learning to ride a bike (this seat will be for my wife).
Any other thought you have about that kind of seats?

15

All guides to deploy using docker mention typing your keys/credentials/secrets into the docker compose file, or use a .env or similar file, I'm wondering how secure is this and if there's a better option.

Also, this has the issue of having to get into the server to manage them, remembering which file has each credential.

Is there a selfhostable secrets manager? I've only found proprietary/paid ones for large infrastructures and I just need it for a couple of my servers/projects.

9
[-] pe1uca@lemmy.pe1uca.dev 12 points 1 year ago

excessive resource use

What's the final size of the git folder?
What's the final time and CPU usage to process the different git commands?

[-] pe1uca@lemmy.pe1uca.dev 10 points 1 year ago* (last edited 1 year ago)

I think is the latter.
IIRC in the code when receiving the downvote the instance just rejects it.
So only in the instance where it was generated gets recorded.

Edit: here's the rejection message. I can't see the whole flow since I'm not at my PC, but it's inside a verify function, so I assume it gets called right when the activity is received before being processed.
https://github.com/LemmyNet/lemmy/blob/main/crates/apub/src/activities/voting/vote.rs#L66

[-] pe1uca@lemmy.pe1uca.dev 11 points 1 year ago

a $2 base subscription with an extra $1 for notifications

This for me is the stupid part about this, reddit is forcing developers to paywall any functionality.
Want the app to automatically refresh your subs each day? $0.5 please.
Want faster loads of each sub? $1 (Sleig mentioned Apollo first pulls 20 posts and then 100 to improve loading, so 2 requests instead of 1).
You reached the average number of calls: do you want continue for $1?
(I'm guessing mods take more requests since they have to see more context about users, posts, comments) do you want mod tools? $2
Is mod mail a separate request? If so then: would you like to have it for $1 more?

And on and on with every new feature which requires more requests than normal.

view more: ‹ prev next ›

pe1uca

joined 1 year ago
MODERATOR OF