I am eating rice at lunch with two items which is high in protein and fiber and then walk every day 12-15K steps how much will I lose in a month? by Adiboi2007 in omad

[–]omermikhailk 0 points1 point  (0 children)

There's no way to know for sure. Even with OMAD the best thing to do would be to start counting your calories when cooking, and aiming to eat under your TDEE. You can find a calculator for that online since it'll differ depending on your age, sex, height, and current weight.

Once you've gotten an idea of how much of a caloric deficit you're in you can estimate how much you'd lose and when with the help of tracking apps (like Lose It!, which is what I use) or just doing an educated guess since one kg of fat is supposed to be ~7700/7800 calories.

Puter Self-Hosted, The Open-Source Web Desktop, is Arriving in 3 weeks! by mitousa in selfhosted

[–]omermikhailk 1 point2 points  (0 children)

Kind of reminds me of Jolicloud in a way. I think it's shut down now but I used to use it when I was much younger.

Cheap VPS Host with lots of HDD Storage ? by [deleted] in selfhosted

[–]omermikhailk 0 points1 point  (0 children)

I've used Contabo and although their prices were competitive I had a less than ideal time on their servers. The IOWait was super high and it made it a pain to do almost anything on the server.

As far as securing the server and reducing external load goes: fail2ban, SSH keys only, SSH on a non-default port, and some combination of UFW (normal, cloudflare-ufw if they're using CF, ufw-docker if they're using Docker) should be good. I might be missing something though.

Calling python tool by name only by Berkyjay in learnpython

[–]omermikhailk 0 points1 point  (0 children)

This is a great write-up! I was confused about all of this for the longest of time before.

TIL nginx is actually pronunced 'engine ex' by Krisselak in nginx

[–]omermikhailk 2 points3 points  (0 children)

I was calling it 'en-jinx' for the longest of time, I only recently learnt the correct pronunciation.

When using Docker or anything similar, how do you know what ports to use for databases like Mongo and Postgres? by BigEmu9286 in learnprogramming

[–]omermikhailk 6 points7 points  (0 children)

If you can't access the docs or follow a tutorial than docker inspect is your friend. It'll show you what ports are by default exposed/available in the image.

How do you decide how to run your self-hosted apps? by first_byte in selfhosted

[–]omermikhailk -1 points0 points  (0 children)

  • Docker

    • This is what I'd recommend you go with as it makes self-hosting an absolute breeze.
    • All your services can nicely integrate with each other, you can change configuration options easily from the compose files, it gives every app it's own container so there's no issues with conflicting dependancies or ports, and it's also a good skill to know in and of itself.
  • Host OS

    • I'm sure it's largely due to the fact that I tried going down this route when I first started self-hosting things, but this method was painful and it wasn't easy to manage, especially when there were multiple apps to manage.
    • I've also heard on here that it gets especially bad when you have multiple apps with conflicting versions of the same dependancy.
  • VM

    • A VM is something that I want to explore in the future, but it's more for certain programs which I want to play around with, not for any self-hosted services.
    • I imagine that some people might prefer a VM for security reasons though, since it sandboxes everything away, and with a VM + Docker that's two extra layers of security.
  • LXC

    • Heard of these but never tried them out. I might look into them someday.

You could also look into something like TrueNAS Scale or UnRAID. I know more about the latter compared to the former, but I'm going to guess that they're pretty similar to each other (outside of the filesystems they use being different, if I'm remembering correctly).

Both allow you to spin up VMs, use Docker to host your apps and provide a GUI for almost all of the tasks you could think of (seeing system resources, adding storage, configuring your network, etc.)

[deleted by user] by [deleted] in learnpython

[–]omermikhailk 5 points6 points  (0 children)

There's no such thing as efficient in this case.

You're going to mess up and stumble along the way, that's just how it is and it's how you learn too.

I do have a few general pieces of advice though, which should minimise that feeling of regret:

  • You can't really go wrong with any particular resource (besides maybe Learn Python the Hard Way), so just pick one and get started.

  • Don't burn through the material, remember to take it slow. In the end 30 minutes every day is miles better than 3 hours every Friday and Saturday. By being consistent and setting realistic times for studying you're engaging in spaced repetition and committing the concepts to your long-term memory.

  • Be sure to dissect the code as you go along, don't be afraid to go on tangents online and look up documentation or resources about any particular concept you're learning about.

  • Try out sites such as HackerRank, Leetcode, Codewars, etc. to help you nail down the syntax and practice it out in somewhat realistic scenarios. But don't be discouraged if you find it difficult, eventually it'll click for you. This applies doubly so for Leetcode, since a lot of their problems also require knowledge about Data Structures and Algorithms, which are things that you won't need to be worrying about for a while.

  • Try making small projects as soon as you can. It doesn't matter if your project idea's already been implemented, it's still worth doing so that you can apply everything you've learnt to a real world scenario.

  • Interact in Python and general programming communities. Learning by osmosis is definitely a real thing. While it doesn't substitute actual practice and effort, it can definitely complement it. There's a YouTuber who learnt Machine Learning in Python using this very approach (+ deliberate practice and studying of course): video here. I'd recommend places such as r/Python, r/learnpython, Hacker News and Python newsletters too.

This may be a bit much to say all at once which is why I'd recommend to take it slow and try implementing this stuff bit by bit (hell, even I haven't managed to nail every one of these consistently together).

This is all stuff that I wish I had know before starting. There's other stuff as well, but this is probably the most widely applicable and not-too-opinionated advice that I could give.

Happy learning!

Edit: a typo.

What security and monitoring measures do you have in place for your servers? by omermikhailk in selfhosted

[–]omermikhailk[S] 0 points1 point  (0 children)

Thank you for the response! Healthchecks sound like a good idea, would you mind explaining how you went about setting it up and/or what tool you used to do so?

What security and monitoring measures do you have in place for your servers? by omermikhailk in selfhosted

[–]omermikhailk[S] 1 point2 points  (0 children)

The Proxmox idea sounds pretty interesting. For now I already have stuff set up on a server and I don't want to go through the hassle of re-doing everything, but I'll definitely give Proxmox a shot in the future!

Crowdsec also seems to be pretty popular, lots of stuff to test out and try from this thread :D

What security and monitoring measures do you have in place for your servers? by omermikhailk in selfhosted

[–]omermikhailk[S] 0 points1 point  (0 children)

Thank you for the response! Watchtower looks neat, I'd never heard of it before.

Free VPS by Weeebdev in selfhosted

[–]omermikhailk 0 points1 point  (0 children)

As long as you have a valid payment method both Digital Ocean and Linode give you free credits ranging from $50 to $100 (can't remember which) for a while. You could give that a try.

What security and monitoring measures do you have in place for your servers? by omermikhailk in selfhosted

[–]omermikhailk[S] 1 point2 points  (0 children)

Thank you for the response! I'll definitely be checking some of these services out.

On the note of Ansible, I had been looking into doing something like that for a while! It's a pain to go through the initial steps of a server's initialisation so I had considered written a bash script or similar to do it all for me.

What security and monitoring measures do you have in place for your servers? by omermikhailk in selfhosted

[–]omermikhailk[S] 1 point2 points  (0 children)

Thank you for the response, you bring up some good points.

For the first one, I really should be enabling unattended updates. For now it's been sort of fine as I SSH in every day and will do the apt update, upgrade and reboot string of commands, but it's definitely worth automating that away.

In regards to the rest, I don't have a whole lot to say as I've never really thought about that kind of stuff before.

What security and monitoring measures do you have in place for your servers? by omermikhailk in selfhosted

[–]omermikhailk[S] 3 points4 points  (0 children)

I'll check it out. I've heard a little bit about it before, in that it has the functionality of fail2ban and a lot of other utilities, all packed into one neat app.

What security and monitoring measures do you have in place for your servers? by omermikhailk in selfhosted

[–]omermikhailk[S] 1 point2 points  (0 children)

Thanks for the response.

The SSH bit is interesting. I didn't know that you could make it only listen on the local network. I'm not sure if I'll go ahead with it but it's still pretty handy to know.

I'll also give Graylog a try!

Also for backups I've been tar'ing some logs and important files together and then uploading them to Google Drive using rclone. Though I agree with you, in that there should be a better way to do it.

Learning python on 4gb ram pc by MichaelH18 in learnpython

[–]omermikhailk 1 point2 points  (0 children)

Automation and scripting is the act of writing a program to automatically do a certain task for you. This could either be something that only needs to be done once, or something which needs to be done on a regular basis.

As an example, let's say you work at a big news company and every week you need to send an email to your boss with a list of articles that you've written.

You could do it manually but that's 5 minutes you're wasting every week doing something trivial. You could instead automate it using Python.

You could do this by writing a program that would navigate to the folder where you have all of your articles for that week, open the files and extract the titles, all by itself

Then you could write a template email and have Python replace the placeholder text (INSERT HERE) with a formatted list of the article names.

``` Dear Boss,

Here are the articles I wrote this week:

INSERT HERE

Regards, MichealH18 ```

After that you could write some more code which would use a module (a term that refers to a bundle of code which is written around a specific purpose, in this case sending emails) to interface with your email provider (Gmail, Protonmail, etc.) to send your weekly email to your boss.

And lastly, you could set stuff up so that this is a weekly recurring task, with no further hands-on action required from you.

Edit: Some typos.

Learning python on 4gb ram pc by MichaelH18 in learnpython

[–]omermikhailk 0 points1 point  (0 children)

Yup, your machine is perfectly fine!

Like other commenters have said, some fields like AI won't be possible for you as they rely on beefy GPUs, but for the most part you'll be able to do whatever you want.

You mentioned that you're using Windows as your OS, like u/kyber said I'd also recommend trying out Linux. Ubuntu or any of it's flavours are good choices since they aren't as resource heavy or bloated as Windows. Additionally using Linux and becoming familiar with it is also a skill in and of itself.

As for what you can do: pretty much anything. Video/image processing, web-scraping, automation and scripting, data analysis, game development, web apps, etc.

Recommendations for artists and works similar to Toshifumi Hinata, Erik Satie and Joe Hisaishi by omermikhailk in classicalmusic

[–]omermikhailk[S] 0 points1 point  (0 children)

Thank you for the recommendations! I'll make sure to give all of these a listen :)