GithubHelp home page GithubHelp logo

njoppi2 / my-scripts Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 2.78 MB

⚙️⏰ Bash scripts that I created, and other settings from my computer

Shell 99.76% Vim Script 0.24%
bash crontab duckdns ifttt-webhooks port-forwarding supervisor

my-scripts's Introduction

my-scripts

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.

Scripts

🪝 Webhooks

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.

📸 Screenshots

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.

⛔ Unusable computer

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.

my-scripts's People

Contributors

njoppi2 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.