dontblink

joined 2 years ago
[–] dontblink@feddit.it 1 points 8 months ago

Have you checked out other types of therapies? Not all therapies are the same and not all medicines are the same!

You might just be missing what works for you! Don't get discouraged, I have been in therapy for 4 years and only after this time I understood that my therapist doesn't make it for me anymore!

I have PTSD from childhood trauma and from what I've read many therapists focus on other symptoms without actually addressing the core trauma.

Currently changing therapy with a microdosing friendly Gestalt therapist! Just the fact of standing for myself in one of the ugliest times makes me feel so proud.

Whatever you do, don't stop trying and don't stop seeking for alternative solutions. Think about how you managed to live with all this pain until now, and how strong you are for that. Most of the others cannot know how much strength is required to deal with such emotions.

Think if one day you will unlock this all, think how many beautiful things you could do with the consciousness of how it feels to actually feel bad!

[–] dontblink@feddit.it 15 points 8 months ago

When Linux phones?

(Actually usable ones)

[–] dontblink@feddit.it 1 points 8 months ago

Crypto - wall street on steroids Bitcoin - an actual alternative to the collapsing monetary economy

That doesn't take into account privacy coins like monero, which have different purposes, but most crypto is bullshit.

[–] dontblink@feddit.it 1 points 9 months ago

Probably an unpopular opinion but if you want absolute minimalism without ads use Violoncello text browser!

[–] dontblink@feddit.it 0 points 9 months ago (1 children)

Can you tell me more about your story?

Thank you

[–] dontblink@feddit.it 2 points 9 months ago

My god would love to see all events on pixelfeld instead of Instagram.....

[–] dontblink@feddit.it 2 points 9 months ago

Having a federated music platform would be great both for people and for artists!

[–] dontblink@feddit.it 1 points 9 months ago (1 children)

How is the user experience compared to matrix? Is it easy to gateway towards matrix or other services? Can I easily join matrix or other communities servers?

I see a lot of people are now using matrix but not so many xmpp, but yeah it hoggs resources on my server too. Also I feel like it's still pretty buggy..

[–] dontblink@feddit.it 1 points 10 months ago* (last edited 10 months ago)

Didn't think about the 2 machines thing. But yeah it looks definitely easier than setting a transparent proxy.. But I guess all of this has to be on the same network, I cannot use an external server to which I connect to via wan because at that point the connections would be already need to be unproxied going out right?

But can't your setup be done on the same machine with a firewall?

[–] dontblink@feddit.it 1 points 10 months ago

Yes DNS and pihole were never thought as content filtering tools

[–] dontblink@feddit.it 1 points 10 months ago* (last edited 10 months ago)

I need to block IPs and unauthorized connections that are not http/https as well, I know about DNS filtering but it's not what I am trying to achieve.

[–] dontblink@feddit.it 1 points 10 months ago

Do you think a Proxy would be better in this regard compared to a firewall? I was trying to watch the logs of ufw today and see if I could do something there but the incoming and outgoing connections are A LOT, and I would essentially like to whitelist both per domain and per IP.

How much maintainance would this require? I wonder how often IPs change today, but with all the NAT, dynamic DNS and CDNs there around maintaining a whitelist only with IP addresses looks like a nightmare..

Squid proxy with squidguard could be a better option than trying to work with a forewall maybe?

16
submitted 1 year ago* (last edited 1 year ago) by dontblink@feddit.it to c/selfhosted@lemmy.world
 

Hi!

First of all sorry if this is the wrong place to ask, if it is, please point me to a better suited channel!

Anyway I've got this old 2TB HDD attached to a rpi 4b, it worked flawlessly until now, the last few days it started disconnecting randomly..

If i reboot it mounts back again.

This is the df output:

/dev/sdb1       1.8T  535G  1.2T  31% /mnt/2tb

And this is sudo dmesg | grep sdb (the device is sdb ofc).

[   14.970908] sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   14.978857] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[   14.984484] sd 1:0:0:0: [sdb] Write Protect is off
[   14.989382] sd 1:0:0:0: [sdb] Mode Sense: 43 00 00 00
[   14.989684] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   15.044802] sd 1:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
[   15.051196] sd 1:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of preferred minimum block size (4096 bytes)
[   15.065585]  sdb: sdb1
[   15.068403] sd 1:0:0:0: [sdb] Attached SCSI disk
[   22.631983] EXT4-fs (sdb1): recovery complete
[   22.660922] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Quota mode: none.

The device has an external power supply of its own, so it's not a power issue.. This setup worked for a couple of years.

I cannot see anything wrong here, pheraps is the HDD which is going bad?

 
fn get_links(link_nodes: Select) -> Option<String> {

        let mut rel_permalink: Option<String> = for node in link_nodes {
            link = String::from(node.value().attr("href")?);

            return Some(link);
        };

        Some(rel_permalink)
    }

This is what I'm trying to do, and I've been stuck with this code for an hour, I simply don't know how to put this function togheter.. Essentially I would like to take some link_nodes and just return the link String, but I'm stuck in the use of Option with the ? operator.. Pheraps trying to write it with match would clear things out(?)

Also I come from JavaScript in which expressions do not have their own scope, meaning I'm having troubles to understand how to get out a variable from a for loop, should I initialize the rel_permalink variable as the for loop result?

This are the errors i get:

error[E0308]: mismatched types
  --> src/main.rs:55:49
   |
55 |           let mut rel_permalink: Option<String> = for node in link_nodes {
   |  _________________________________________________^
56 | |             link = String::from(node.value().attr("href")?);
57 | |
58 | |             return Some(link);
59 | |         };
   | |_________^ expected `Option<String>`, found `()`
   |
   = note:   expected enum `Option<String>`
           found unit type `()`
note: the function expects a value to always be returned, but loops might run zero times
  --> src/main.rs:55:49
   |
55 |         let mut rel_permalink: Option<String> = for node in link_nodes {
   |                                                 ^^^^^^^^^^^^^^^^^^^^^^ this might have zero elements to iterate on
56 |             link = String::from(node.value().attr("href")?);
   |                                                          - if the loop doesn't execute, this value would never get returned
57 |
58 |             return Some(link);
   |             ----------------- if the loop doesn't execute, this value would never get returned
   = help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
 

Programs with custom services, virtual environments, config files in different locations, programs creating datas in different location...

I know today a lot of stuff runs in docker, but how does a sysadmin remember what has done on its system? Is it all about documenting and keeping your docs updated? Is there any other way?

(Eg. For installing calibre-web I had to create a python venv, the venv is owned by root in /opt, but the service starting calibre web in /etc/systemd/system needs to be executed with the User=<user> specifier because calibre web wants to write in a user home directory, at the same time the database folder needs to be owned by www-data because I want to r/w it from nextcloud... So calibreweb is installed as a custom root(?) program, running in a virtual env, can access a folder owned by someone else, but still needs to be executed by another user to store its data there... )

Despite my current confusion in understanding if all of this is right in terms of security, syntax and ownership, No fucking way I will remember all this stuff in a week from now.. So... What do you use to do, if you do something? Do you use flowcharts? Simple text documents? Both?

Essentially, how do you keep track?

 

Hi! I'm trying to learn Rust, as a little project, I'm trying to build a web scraper that will scrape some content and rebuild it with a static site generator, or using it for making POST requests.

I'm still at a very early stage and I still don't know much, the simplest error handling strategy I know is using match with Result.

To my eyes, this syntax looks correct, but also looks kind of a lot of lines for a simple http request.

I know the reqwest docs suggest to handle errors with the ? operator, which I don't know yet, therefore I'm just using what I know now.

fn get_document(permalink: String) -> Html {
        let html_content_result = reqwest::blocking::get(&permalink);
        let html_content = match html_content_result {
            Ok(response) => response,
            Err(error) => panic!("There was an error making the request: {:?}", error),
        };

        let html_content_text_result = html_content.text();
        let html_content_text = match html_content_text_result {
            Ok(text) => text,
            Err(error) =>
                panic!(
                    "There was an error getting the html text from the content of response: :{:?}",
                    error
                ),
        };

        let document = Html::parse_document(&html_content_text);

        document
    }

As for my understanding, this is what I'm doing here: I'm making an http request, if i get a Response, I try to get the text out of the response body, otherwise I handle the error by panicking with a custom message. Getting the text out of the request body is another passage that requires error handling, therefore I use the match expression again to get the text out and handle the possible error (In what circumstances can extracting the text of a response body fail?).

Then I can finally parse the document and return it!

I wonder if it is a correct and understandable way of doing what I've in mind.

Do you think this would be a suitable project for someone who is at chapter 7 of the Rust book? I feel like i actually need to build somethiong before keep going with the theory!

 

Bonus points if it can be activated automatically for certain sites.

I'm tired to find bloated content everywhere.

 

I can't find it in the settings but is there any way to sort comments by popularity instead of time? Just like it is in normal reddit?

 

Honestly all this world looks really overwhelming, there's too much stuff going on: each program uses its own languages, its own compilers, uses different tools, libraries, dependencies, package managers and frameworks. You need specific instructions and documentation to learn new stuff at every single thing you deal with.

Whenever i open a project on Github i just feel overwhelmed because there will always be something new and i'm afraid i won't ever get out of that way of operate that "somehow makes things work" and really understand my code and program interactions..

Honestly it's really complicated because you use a program you need and you just see it from the surface, you don't have the time to learn how things work in a slightly more linear way, it would take ages considering the fact you probably need other 10 programs like that. To me it looks just like modern programming is about grabbing different pieces of fragmented knowledge all around web forums, wikis (or chatbots, which for me are just the next way of giving up our ability to learn) and somehow making things work.

I just get overwhelmed even when i take a look to a github page sometimes, even the frontpage has so much stuff you won't ever learn.

Another thing is the online community is the most sparse thing, far from actual real communities there is, you can work with people who won't ever even talk to, and their contribute can be as sterile as just creating a pull request and then leaving forever. You are mostly on your own striclty speaking of human connections and ability to share ideas and feelings.

I'm very fought because i somehow feel like i really love how certain ideals and creativity can be expressed with programming: i love that you can use something practical to solve idealistic, creative and technical problems. I love stuff such as digital etic, cypherpunk movemenet and all the work that opensource devs do to make the industry just a bit better, sometimes even receiving donations for their work, which for me is the highest form of payment, i've never seen someone more happy to pay for something as in the opensource community. But at the same time i'm starting to loathe technology and the internet because, adding on top of everything i said above about the sterility of the community, the difficulty to concentrate on a single thing and the dispersion there can be, i'm also dealing with a 10 years porn addiction since 5 years ago, progresses happens but are really slow and using my computer or phone is a huge trigger even if i'm trying my best to make them as minimal and not addictive as possible. Trust me, in a world designed to get you addicted to your hardware and software, being grown up used to doom scroll every day, it takes a huge amount of time and effort to have your things all sorted up to guarantee yourself a bit more privacy and software that is actually useful and doesn't want to keep you hooked, and at the same time don't be too much of a social outcast. You actually have to re-learn computer, or better saying, to actually learn computer for the first time, because you realize you can't just rely on having everything ready, set up, and just working from scratch without paying in some way, and the price that most big techs set is even higher, and far more subtle than just paying with money.

The software industry right now is shit outside of the few developers that are actually building products FOR users, and not for money, and of course that does mean that if i follow my ideals, i won't nearly have these much economical opportunities as every "usual" developer gets. It's a huge headache having to deal with programs even when i do it for myself, i can't even think of doing that for someone else right now (with all the work and continuity that this requires) and i'm thinking if i should really put my efforts somewhere else.

 

Bibliogram is being discontinued, and Barinsta doesn't work anymore too..

Is there some good soul providing an instagram frontend or app? I really need it to see events, but i don't want to get caught in those useless post suggestions and ads, i just wanna see the content i chose to see.

 

These are the things i care the most: I want a smartphone i can repair on my own (battery and screen are the essential parts), with a bootloader easily unlockable, even better with verified boot / supporting a custom OS with re-lockable bootloader.

I don't care if it's supported by an official foundation or by custom ROMs foundations, i want something that will most likely get the longest term updates and security patches.

Does a device like this even exists?

I know that probably one of the few alternatives here is the fairphone, however it's really expensive and i've read many negative reviews of it (pieces staying out of stock for months or stuff like that), and i can't see the meaning of having a repairable smartphone if i have to spend the same money that i would spend buying 3 smartphones with the same specs that would last me the same time. That said, i know the market isn't favouring these kind of businesses and these devices NEED to be expensive in order to keep existing, but i would like to know some other possible alternatives that satisfy these requirements, if they even exist.

Honestly i've come to a point i would probably prefer spend my money on a guitar instead that on a smartphone and just give up, the industry is terrible 😅

 

I regurlary took nandroid backups on my pc with TWRP (adb backup --twrp) of my phone, one day i needed to restore one and i found out i wasn't able to, the restore would stop midway and i needed to completely reset my phone..

Probably the corruption could have happened because i originally took the backups on a PC with a Ryzen processor, that's what i managed to figure out.

Anyway now i wanna make sure to have safe and healthy nandroid backup, is there a way to check this without having to try to restore on an emulator every time?

 

From a first perspective it actually looks good! I think these kind of regulation were really needed. But i would like to hear your opinions!

 

The new fairphone 5 came out, it looks cool but the price is really, really high..

If it's a phone that can really last 10 years it could be good, but is that true? Is it worth it? I could get the one with /e/os from Murena because i want a degoogled phone with a bootloader locked, but is it usable on a daily basis?

view more: ‹ prev next ›