Fullstack Engineer creating optimized, good software.

I'm Yassine Fathi, a Fullstack Engineer based in Belgium. I specialize in creating optimized and high-quality software for web and mobile applications. I have a passion for solving real customer problems and delivering practical solutions that align with business objectives.

Let's build something amazing together!

Featured Articles

Monitor a website for changes

## Introduction This article will show you how to monitor a website for changes. This is useful if you want to be notified when a website changes, for example, when a new blog post is published, a black friday sale starts, or an item is back in stock. ## Prerequisites - [ ] A [Telegram](https://telegram.org/) account - [ ] An ubuntu server with [Docker](https://docs.docker.com/engine/install/ubuntu/) installed - [ ] [Docker compose](https://docs.docker.com/compose/install/) installed ## Steps ### 1. Create a Telegram bot 1. Open Telegram and search for `@BotFather` 2. Send `/newbot` to `@BotFather` 3. Enter a name for your bot 4. Enter a username for your bot 5. Copy the token that `@BotFather` gives you ### 2. Create a Telegram chat 1. Open Telegram and search for `@userinfobot` 2. Send `/start` to `@userinfobot` 3. Send `/my_id` to `@userinfobot` 4. Copy the chat id that `@userinfobot` gives you ### 3. Create a Docker compose file 1. On your ubuntu server, create a file called `docker-compose.yml` with the following content: ```yaml version: "3.9" volumes: data: services: changedetection: image: dgtlmoon/changedetection.io:dev container_name: changedetection hostname: changedetection volumes: - data:/datastore environment: - PORT=5000 - PUID=1000 - PGID=1000 - WEBDRIVER_URL=http://browser-chrome:4444/wd/hub - PLAYWRIGHT_DRIVER_URL=ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true - BASE_URL=http://localhost:5000 restart: unless-stopped ports: - 5000:5000 browser-chrome: hostname: browser-chrome image: selenium/standalone-chrome-debug:3.141.59 environment: - VNC_NO_PASSWORD=1 - SCREEN_WIDTH=1920 - SCREEN_HEIGHT=1080 - SCREEN_DEPTH=24 volumes: - /dev/shm:/dev/shm restart: unless-stopped playwright-chrome: hostname: playwright-chrome image: browserless/chrome restart: unless-stopped environment: - SCREEN_WIDTH=1920 - SCREEN_HEIGHT=1024 - SCREEN_DEPTH=16 - ENABLE_DEBUGGER=false - PREBOOT_CHROME=true - CONNECTION_TIMEOUT=300000 - MAX_CONCURRENT_SESSIONS=10 - CHROME_REFRESH_TIME=600000 - DEFAULT_BLOCK_ADS=true - DEFAULT_STEALTH=true ``` ### 4. Start the Docker containers 1. On your ubuntu server, run the following command to start the Docker containers: ```bash docker-compose up -d ``` ### 5. Add a website to monitor 1. Open a web browser and navigate to `http://localhost:5000` ![changedetection.io](/images/screenshot_1.png) 2. Paste the URL of the website you want to monitor in the `URL` field ![new website](/images/screenshot_2.png) 3. Click `Edit > Watch` 4. Under time between checks, select your preferred interval ![time between checks](/images/screenshot_3.png) 5. Under the `Request` tab, set `Fetching method` to `Playwright Chromium/Javascript via 'ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true'` and `Wait seconds before extracting text` to a number higher than 15 6. Under the `Notifications` tab, enter the Telegram chat id and token you copied earlier as the following format: ```text tgram://<token>:<chat-id> ``` 7. Click `Save` You should now receive a notification when the website changes. ## Conclusion In this article, you learned how to monitor a website for changes. This is useful if you want to be notified when a website changes, for example, when a new blog post is published, a black friday sale starts, or an item is back in stock. ## Resources - [ ] [changedetection.io](https://changedetection.io/)

November 28, 20223 min read438 words

Secure your home network with Pi-hole

## [Introduction](#introduction) In this article, we will discuss how to secure your home network with Pi-hole. We will cover the following topics: - [Introduction](#introduction) - [Prerequisites](#prerequisites) - [Setting up Pi-hole](#setting-up-pi-hole) - [Conclusion](#conclusion) ## [Prerequisites](#prerequisites) - A server running Ubuntu 20.04 or later - Docker installed ## [Setting up Pi-hole](#setting-up-pi-hole) ### Installation To install Pi-hole, run the following command: ```bash docker run -d \ --name=pihole \ --restart=always \ -p 53:53/tcp \ -p 53:53/udp \ -p 80:80 \ -p 443:443 \ -v /path/to/pihole:/etc/pihole \ -v /path/to/dnsmasq.d:/etc/dnsmasq.d \ -e TZ=America/New_York \ -e WEBPASSWORD=your-password \ pihole/pihole:latest ``` ### Configuration To configure Pi-hole, open your browser and go to `http://your-ip/admin`. You will be prompted to enter the password you set in the `docker run` command. Once you have entered the password, you will be able to access the Pi-hole dashboard. ### Changing DNS settings on your devices To change the DNS settings on your devices, go to your router's settings and change the DNS settings to the IP address of your Pi-hole server. #### Windows To change the DNS settings on Windows, go to `Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings`. Right-click on your network adapter and select `Properties`. Select `Internet Protocol Version 4 (TCP/IPv4)` and click `Properties`. Select `Use the following DNS server addresses` and enter the IP address of your Pi-hole server in the `Preferred DNS server` and `Alternate DNS server` fields. #### macOS To change the DNS settings on macOS, go to `System Preferences > Network > Advanced > DNS`. Click the `+` button and enter the IP address of your Pi-hole server in the `Server` field. #### Linux To change the DNS settings on Linux, go to `System Settings > Network > Network Connections`. Right-click on your network adapter and select `Edit Connections`. Select `IPv4 Settings` and click `Add`. Enter the IP address of your Pi-hole server in the `DNS` field. #### Android To change the DNS settings on Android, go to `Settings > Network & Internet > Wi-Fi`. Select your Wi-Fi network and click `Modify network`. Select `Show advanced options` and enter the IP address of your Pi-hole server in the `DNS 1` and `DNS 2` fields. #### iOS To change the DNS settings on iOS, go to `Settings > Wi-Fi`. Select your Wi-Fi network and click `Configure DNS`. Select `Manual` and enter the IP address of your Pi-hole server in the `Primary DNS` and `Secondary DNS` fields. ## [Conclusion](#conclusion) In this article, we discussed how to secure your home network with Pi-hole. We installed Pi-hole and configured it to block ads and malware. We also configured Pi-hole to use Cloudflare's DNS servers. ## Further reading - [Pi-hole](https://pi-hole.net/) - [Pi-hole on Docker Hub](https://hub.docker.com/r/pihole/pihole)

November 26, 20223 min read451 words

Website created by Yassine Fathi © 2023

Built with Next.js & Hosted in my Homelab