You could do it as a contractor. Provide an invoice.
But even that is getting cloudy as if someone hires you to do that and later has you stop, for any reason, you can file a lawsuit as an employer, depending on who set the hours, location, who provided equipment, etc.
I need for you to optimize the performance of my computer.
I will pay you $4.00/hour and all the beer you can drink.