A git repository created at the root (/) of my computer, with a .gitignore whitelisting only files with scripts and settings that don't contain personal information.
If you already have a non-empty directory where you want to add this repository, follow these 4 steps:
-
Initialize Git in Your Current Directory
In your terminal, navigate to your target folder and run:git init
-
Add the Remote Repository
Link your local repository to the remote GitHub repository:git remote add origin https://github.com/njoppi2/my-scripts.git
-
Fetch the Remote Data
Download the remote branches and commits:git fetch
-
Checkout the Desired Branch
Check out the branch that contains your scripts (in this case,myScripts
):git checkout -t origin/myScripts
I wanted to be able to say commands to the Google Assistant on my phone, and interact with my computer through that. The steps I took to do that were the following (source):
- Use IFTTT integrated with Google Assistant to make a POST request to the computer every time I tell the assistant a specific command.
- Since my public IP is dynamic, I use duckdns to host a website that will listen to that POST request then forward it to my computer's IP address.
- To make sure my IP address is updated, I have a crontab job on my computer that updates the forwarding address on duckdns every 5 minutes.
- Port-forward every request from a custom port of your router to your computer, which should have a static private IP.
- Set up a webhook listener that starts on startup, and is managed by supervisor while the computer is online.
- Map webhook requests to the desired scripts.
Sometimes I had the problem of not knowing how I had spent my time during a day or even week, so I created this to help me remember. The idea is very simple, a crontab job that takes a screenshot of my screen every 20 min, and saves it inside a folder named with the current date. On startup I upload to a website called Notion the current date, so I can keep track of the days I have screenshots and upload them there later.
I really dislike to forget the time, and have to cook dinner too late at night. A time that works for me is at around 10h30 PM, so I created a script with the intention of making it easier for me to cook at that time than to keep using the computer. The script executes every 30 sec between 10h30 PM and 11h00 PM, minimizing all the windows, and disabling Wi-Fi. If I'm busy and really need to use the computer during that time, it can be turned off.