Skip to content

Instantly share code, notes, and snippets.

@aleixmorgadas
aleixmorgadas / 0_README.md
Last active June 24, 2024 12:30
Starting a FastAPI as a server mock

Using FastAPI as Server Mock

I wanted to start a real mock server with real instances that I could fine tune for my own needs.

I found a way to start the FastAPI to run the tests agains it, and then kill the uvicorn.

Here an example code 👍

image

@Raltar
Raltar / gist:586be522a0f3ddf2a52c5ba71533bdfc
Created May 6, 2023 02:13
Ubuntu 22.04 on Asus ROG Zephyrus G14 (2023 Version)
Here are my notes on how to set up an Asus ROG Zephyrus G14 2023 edition (with Ryzen 7940HX and Nvidia 4060) with Ubuntu 22.04
Thanks and respect to Vijay Prema whose earlier guide to the 2021 version of this laptop would have saved me a lot of time if I'd read it earlier. It still contains great info and is the inspiration for this 2023 version.
https://gist.github.com/vijay-prema/cfcf8cc4085663b7bb48f34172c10629
Currently I have most everything functioning correctly EXCEPT:
- It doesn't seem to bring video back after waking up from suspend. Currently I have to hold down the button to force it to turn off then reboot any time it suspends, so for now I just disable automatic suspension.
- NVIDIA-Prime, the plugin that lets you select between Ryzen integrated and Nvidia discrete graphics works only from the command line and with a reboot. It does not show up in the Nvidia control panel, and when it's in dynamic mode, it always seems to activate the Nvidia discrete graphics. The command-line selection
@nidr0x
nidr0x / podman_mac.md
Created March 10, 2022 00:18
Podman on Mac M1

Podman on Mac M1

Install the podman command

brew install podman

Initialize the podman virtual machine

podman machine init

Start the podman virtual machine

podman machine start

@ammarshah
ammarshah / all_email_provider_domains.txt
Last active September 17, 2024 13:19
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org

How to calculate your hourly rate as a freelancer?

Many people struggle with this question. Some just try to make as much as a full-time employee makes (and ignore that they won't be able to bill as many days). Others follow tips on startup related websites that suggest to ask for 20% to 50% more than an salary would yield (and ignore the additional risk and expenses they have).

Below you will find some numbers to help you calculate how high your hourly or daily rate should be.

Your yearly income should be higher than an average salary

  • You take more risk than full time employees, phases without income are likely