Categories
Raspberry Pi User Help

I would like to be able to simply send an email from within Python script, using msmtp. Looking for correct syntax

So, with msmtp installed and working on my Rpi running Buster, I can use this command line to send an email and it works just fine" echo ‘Message Text’ | mail -s "message subject text" destination-email-address@gmail.com I would like to be able to send an email from within a Python script just as simply. Is […]

Categories
Mastering Development System & Network

Connect to a windows machine via machine (Port forward 3389 TCP and UDP)

So, I have a mac machine, that can reach a windows machine (using vpn). I want to access the windows machine from a machine in local network. I tried port forwarding by running following command on my mac. ncat –keep-open -l 0.0.0.0 3390 –sh-exec "ncat 90.12.32.43 3389" & where 90.12.32.43 is the ip address of […]

Categories
Game Creation Mastering Development

How do farming simulators handle updating a fields texture when cultivating or plowing it?

So, I have been wanting to make a farming simulator on Unity for a while now, and I have finally decided to give it a shot. This would be my first project. However, I would like to know how to update a field to show a cultivated or plowed texture based on where a plow […]

Categories
Ask Cooking & Recipes

Orange cake recipe

So, two days ago I went to bed dreaming (not literally) of a yummy cake with a double-yummy frosting

Categories
Linux Mastering Development Ubuntu

Best way to add internal hard drive for media to ubuntu server

So, I’ve got the latest version of Ubuntu server, Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-47-generic x86_64), installed and running off a ssd. I’ve already added the hard drive and managed it with Cockpit but I’m wondering whether I’ve set it up correctly. Especially the mount point. I’ve also seen the it change from sdd to sdc […]

Categories
CMS Mastering Development Wordpress

Add New Tab to Woocommerce My Account

So, I’m building a website and I need to add a new Tab in the WooCommerce My Account section. When you visit the My Account page you get options like Edit Profile, Orders, Downloads, etc.. I want another Menu/Page there called "Projects", so the idea is that, I am a graphic designer, whenever someone buys […]

Categories
User Help

“Reset this PC” stoping and going to boot options

So, I have two HDs, one internal and one external, i’ve had them for quite some time and needed to clean them, the external one was easy, and in there I have the Windows installer, now I need to clean the internal HD, but i don’t really want to install Windows again, so i thought […]

Categories
Linux Mastering Development

Are prints to files logged somewhere?

So, I had a little accident the other day. I printed a file from a website to a PDF (using the Firefox print-to-file functionality). Unfortunately, I forgot to change the filename of the destination and wasn’t properly paying attention. So I overwrote another PDF that I had printed via Firefox some time ago. I do […]

Categories
Mastering Development

Ho do I replace None with -1?

So, the task is to multiply n-th power of the element in the array with the index n. If n is outside of the array, then return -1. I can’t get how to return -1. Sorry for that stupid question from stupid me. def index(array, n): for j,i in enumerate(array): if j == n: res […]

Categories
Mastering Development Software

What naming convention to use for a project with a controller, service, and repository layer?

So, the API has three layers it goes through; controller, service, and repository. For the controller, I can name the methods according to CRUD; create, read, update, and delete. What should I do for the service and the repository? For some background, I’m developing a NestJS project with MongoDB as the DB. Here’s a rough […]