CheatSheet

Git

git unadd

git config --global alias.unadd "reset HEAD"

Linux

Creating a Service

Creating a systemd service is super useful! And makes it simple to create scripts that run on reboot and rely on certain system services, like the network, to be started before your script.

Create /etc/systemd/system/my-service.service

[Unit]
Description=My Script
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=your-username
ExecStart=/usr/bin/env python /home/your-username/cool.py

[Install]
WantedBy=multi-user.target

React

Testing

I really enjoyed this read about what to test and not to test in React. It also talks about best practices.

Main Idea:

react-testing-library forced me to think more about what I wanted to test and users behavior. I had to think differently and move away from implementation testing (which I feel is easier and natural with Enzyme) into more functional testing (which feels natural with react-testing-library).

Typescript Electron Apps