• 0 Posts
  • 20 Comments
Joined 1Y ago
cake
Cake day: Jun 26, 2023

help-circle
rss

Install Pi-Hole to block ads but use DNS server provided by the biggest ad company? o.O


I once had a bug in a C# program I wrote. It made a HTTP request and if the user agent was left to default (whatever that was), the server just gave back an empty string as a reply. I took way to long until I understood what was going on and I kept chasing async, thinking I had messed it up some how.


Having those features would really have made it easier. I have only ever written my python code in Sublime Text. While it is a sublime text editor, at is not ideal (compared to how it is to write Java in IntelliJ) for Python. (Maybe with addons but I never delved into that more than a few.)


It’s because there is no clear indication of where a block ends.

Here is some sample code. I find it difficult to tell how many indentations I have or where I need to write if I want to continue at a certain level.

import time
import aiohttp

"""
Retreives the data from RSS URL and return the status codes as well as the data. Return -1 if something went wrong.
"""
async def get_rss_feed(rss_url):
    async with aiohttp.ClientSession() as session:
        try:
            retry_count = 0
            while retry_count < 5:
                async with session.get(rss_url) as resp:
                    if resp.status == 200:
                        return {'status': resp.status, 'data': await resp.text()}
                    else:
                        retry_count += 1
                        time.sleep(60)
            if retry_count == 5:
                raise ValueError('To many failed connection attempts', retry_count)
        except aiohttp.InvalidURL as error:
            return {'status': -1, 'data': f"Error: {rss_url} is not a valid URL.", 'error': error}
        except aiohttp.ClientConnectorError as error:
            return {'status': -1, 'data': f"Error: Could not connect to {rss_url}.", 'error': error}
        except ValueError as error:
            return {'status': -1, 'data': f"Error: Could not connect to {rss_url} after {retry_count} attempts.", 'error': error}

Too much nested code was likely part of the problem, but not being able to easily tell where a block of coded ended without seeing the top of the block made it difficult to work with.


I once wrote a bot in python tdownloaded a ical file, looked for chances and informed me if found. The space indentation made it hell to follow the code in my opinion.


That sounds like a great boss, someone how is involved with what should be done but not always how, as long as the team deliver what is requested.


If someone really wants this service but do not want to (or cannot) host it themself, https://ovpn.com offer this in their client. I used to have a pi-hole selfhosted but not anymore. Using their client on my phone as well solved the problem with blocking ads while not at home.




Feature-rich

To be able to set download location, not download into folders, change location based on category, stop seeding after ratio or time, watch a folder for torrent files, delete said files after importing them, minimize to tray.

Not sure what transmission can and cannot do, but those are some examples of features in this context. Others may have a different opinion.


Being a power user does not automatically mean you need to use Linux. Not trying to defend any other OS out there, just don’t like this gate keeping attitude.


Just the option to not have the new torrent dialog pop up every time is reason enough for me. And just proper sorting. And quick content overview.



I get that a malware can get inside the worlds most secure system, if for example a user lets it in. What I am saying is that showing a honey pot in response to “ssh is more secure than a software that runs code without you giving consent and without your knowledge” not say anything, except what happens if someone gets in.


Running a honey pot for SSH and sharing logs only proves that people try to attack you, it does not really tell if SSH as such is vulnerable or not. It is a honey pot, people gaining access if the whole point.

Having a locked down but exposed SSH access is something else.


I hate googling things and just being lead back to reddit

This is so far my biggest problem med Lemmy and federation in general, all content is not in one place. It was nice just searching for problem x reddit and you found a solution 9/10 times (because you had everything in one place).



I’ve never heard of joplin but it looks just like what I need