Skip to content

Blog

Setting Up RuneLite for Building with IntelliJ IDEA

Setting up RuneLite for building with IntelliJ IDEA involves several steps. Here's a step-by-step guide to get you started:

Getting Started

  1. Download and Install IntelliJ IDEA: If you haven't already, download and install IntelliJ IDEA. The Community Edition is free and sufficient for RuneLite development.

  2. Install JDK 11: RuneLite is built using JDK 11. You can install this JDK version through IntelliJ IDEA itself by selecting the Eclipse Temurin (AdoptOpenJDK HotSpot) version 11 during the setup.

Importing the Project

  1. Clone RuneLite Repository: Open IntelliJ IDEA and select Check out from Version Control > Git. Then, in the URL field, enter RuneLite's repository URL: https://github.com/runelite/runelite. If you plan to contribute, fork the repository on GitHub and clone your fork instead.

  2. Open the Project: After cloning, IntelliJ IDEA will ask if you want to open the project. Confirm by clicking Yes.

Installing Lombok

  1. Install Lombok Plugin: RuneLite uses Lombok, which requires a plugin in IntelliJ IDEA.
  2. Go to File > Settings (on macOS IntelliJ IDEA > Preferences) > Plugins.
  3. In the Marketplace tab, search for Lombok and install the plugin.
  4. Restart IntelliJ IDEA after installation.

Building the Project

  1. Build with Maven: RuneLite uses Maven for dependency management and building.
  2. Locate the Maven tab on the right side of IntelliJ IDEA.
  3. Expand the RuneLite (root) project, navigate to Lifecycle, and double-click install.
  4. After building, click the refresh icon in the Maven tab to ensure IntelliJ IDEA picks up the changes.

Running the Project

  1. Run RuneLite:
  2. In the Project tab on the left, navigate to runelite -> runelite-client -> src -> main -> java -> net -> runelite -> client.
  3. Right-click the RuneLite class and select Run 'RuneLite.main()'.

Conclusion

You've now set up and run RuneLite using IntelliJ IDEA! If you encounter any issues, consult the Troubleshooting section of the RuneLite wiki for common solutions. Remember to keep both your JDK and IntelliJ IDEA up to date to avoid potential issues.

How to Write a Simple Woodcutting Script Using DreamBot API in 2024

In this tutorial, we will walk through the process of creating a simple woodcutting script using the DreamBot API. This script will allow your in-game character to autonomously chop trees, bank logs, and repeat this process indefinitely.

Prerequisites

Before we begin, ensure you have the following:

  • An Integrated Development Environment (IDE) of your choice. We will be using IntelliJ IDEA in this guide.
  • A clean project containing your script's Main class.
  • Basic understanding of Java.

Setting Up Your Project

First, you need to set up your development environment. If you need help with this, you can visit Setting Up Your Development Environment.

Next, create a new project and define your script's Main class. For help with this, visit Running Your First Script.

Creating a Woodcutting Script

Our woodcutting script will involve various tasks such as finding trees, chopping them, walking to the bank, and depositing logs. We will create different states to handle these tasks.

public enum State {
    FINDING_TREE,
    CHOPPING_TREE,
    WALKING_TO_BANK,
    BANKING,
    USEBANK,
    WALKING_TO_TREES
}

Now, we will create a method within our Main class that returns our current state:

public State getState() {
    if (Inventory.isFull() && !BANK_AREA.contains(Players.getLocal())) {
        return State.WALKING_TO_BANK;
    }
    if (!Inventory.isFull() && !TREE_AREA.contains(Players.getLocal())) {
        return State.WALKING_TO_TREES;
    }
    if (Inventory.isFull() && BANK_AREA.contains(Players.getLocal())) {
        return State.BANKING;
    }
    if (!Inventory.isFull() && TREE_AREA.contains(Players.getLocal())) {
        return State.FINDING_TREE;
    }
    return null;
}

Walking to the Bank

Define a method to handle the state of walking to the bank:

if (Inventory.isFull() && !BANK_AREA.contains(Players.getLocal())) {
    return State.WALKING_TO_BANK;
}

Next, implement the logic for walking to the bank in your main loop:

switch (getState()) {
    case WALKING_TO_BANK:
        if (!LocalPlayer.isMoving()) {
            BANK_AREA.getRandomTile().click();
        }
        break;
    // Other cases
}

Banking

Now, let's handle the banking state. We'll start by interacting with the bank booth:

if (!Bank.isOpen() && !LocalPlayer.isMoving()) {
    GameObjects.closest("Bank booth").interact("Bank");
}

Next, deposit the logs into the bank and close the bank interface:

case BANKING:
    Bank.depositAll("Logs");
    Time.sleepUntil(() -> !Inventory.contains("Logs"), 2000);
    if (!Inventory.contains("Logs")) {
        Bank.close();
    }
    break;

Walking Back to the Tree Area

To return to the tree area, we need to add a new state and corresponding logic:

if (!Inventory.isFull() && !TREE_AREA.contains(Players.getLocal())) {
    return State.WALKING_TO_TREES;
}

case WALKING_TO_TREES:
    if (!LocalPlayer.isMoving()) {
        TREE_AREA.getRandomTile().click();
    }
    break;

Finding and Chopping Trees

Finally, implement the code that finds and chops trees:

case FINDING_TREE:
    GameObject tree = GameObjects.closest(t -> t.getName().equals("Tree"));
    if (tree != null && tree.interact("Chop down")) {
        Time.sleepUntil(LocalPlayer::isAnimating, 2000);
    }
    break;

Wrapping Up

That's it! You've now created a basic woodcutting script using the DreamBot API. This script will autonomously navigate your character to chop trees, store logs in the bank, and repeat the process. Happy scripting!

Setting Up Your Development Environment For DreamBot Scripting: Intellij IDEA

In this tutorial, we'll guide you through the process of setting up your development environment for DreamBot scripting. This setup will enable you to create and execute your own scripts.

Prerequisites

Before beginning, ensure you have:

  1. The Java Development Kit (JDK) installed. Instructions are available in the Installing JDK section.
  2. DreamBot installed on your computer. Launch it at least once to access the client files.

Integrated Development Environment (IDE)

Since DreamBot scripts are written in Java, using an Integrated Development Environment (IDE) like IntelliJ IDEA can be very helpful.

Download and Install IntelliJ IDEA

Create a New Project

1. Open IntelliJ IDEA. 2. Click New Project. 3. Select Java, with IntelliJ as the build system. 4. Choose the JDK you downloaded earlier. 5. Name your script and set the project's save location. 6. Click Create.

Configure the Project

  1. Right-click the src folder and choose New -> Java Class.
  2. Name your class, e.g., "TestScript".

Add Dependencies

  1. Go to File -> Project Structure.
  2. Under Libraries, click the "+" and select Java.
  3. Navigate to the DreamBot BotData folder and choose the client.jar file.

Add an Artifact

  1. Go to File -> Project Structure.
  2. Select Artifacts.
  3. Click "+" and choose JAR -> From modules with dependencies.
  4. Set the Output directory to the DreamBot Scripts folder.
    • Windows: C:\Users\YOUR_USER\DreamBot\Scripts
    • Linux/MacOS: /home/YOUR_USER/DreamBot/Scripts
  5. Exclude client.jar from the artifact by removing it from the list.

For detailed instructions on script setup and execution, refer to the Running Your First Script guide.

Summary and Expense Overview

Utilizing RAG and Langchain with GPT-4 for this blog post has been enlightening. The RAG AI Assistant has been invaluable in formulating ideas and providing project assistance. Below is the cost breakdown for using RAG AI Assistant:

  • Total Tokens Processed: 1797
  • Tokens for Prompts: 1285
  • Tokens for Completions: 512
  • Overall Expenditure (USD): $0.06927

This highlights the efficiency and cost-effectiveness of the RAG AI Assistant in content creation.

Downloading Teri Meri Doriyaann using Python and BeautifulSoup

Teri Meri Dooriyann

Overview

In today's streaming-dominated era, accessing specific international content like the Hindi serial "Teri Meri Doriyaann" can be challenging due to regional restrictions or subscription barriers. This blog delves into a Python-based solution to download episodes of "Teri Meri Doriyaann" from a website using BeautifulSoup and Selenium.

Disclaimer

Important Note: This tutorial is intended for educational purposes only. Downloading copyrighted material without the necessary authorization is illegal and violates many websites' terms of service. Please ensure you comply with all applicable laws and terms of service.

Prerequisites

  • A working knowledge of Python.
  • Python environment set up on your machine.
  • Basic understanding of HTML structures and web scraping concepts.

Setting Up the Scraper

The script provided utilizes Python with the Selenium package for browser automation and BeautifulSoup for parsing HTML. Here’s a step-by-step breakdown:

Setup Logging

The first step involves setting up logging to monitor the script's execution and troubleshoot any issues.

import logging
# Setup Logging

def setup_logger():
logger = logging.getLogger(**name**)
logger.setLevel(logging.INFO)

    file_handler = logging.FileHandler("teri-meri-doriyaann-downloader.log", mode="a")
    log_format = logging.Formatter(
        "%(asctime)s - %(name)s - [%(levelname)s] [%(pathname)s:%(lineno)d] - %(message)s - [%(process)d:%(thread)d]"
    )
    file_handler.setFormatter(log_format)
    logger.addHandler(file_handler)

    console_handler = logging.StreamHandler()
    console_handler.setFormatter(log_format)
    logger.addHandler(console_handler)

    return logger

logger = setup_logger()

Selenium Automation Class

Selenium simulates browser interactions. The SeleniumAutomation class contains methods for opening web pages, extracting video links, and managing browser tasks.

from selenium import webdriver

    # Selenium Automation

    class SeleniumAutomation:
    def **init**(self, driver):
    self.driver = driver

        def open_target_page(self, url):
            self.driver.get(url)
            time.sleep(5)

The extract_video_links method in the SeleniumAutomation class is crucial. It navigates web pages and extracts video URLs.

    def extract_video_links(self):
        results = {"videos": []}
        try: # Current date in the desired format DD-Month-YYYY
        current_date = datetime.datetime.now().strftime("%d-%B-%Y")

                    link_selector = f'//*[@id="content"]/div[5]/article[1]/div[2]/span/h2/a'
                    if WebDriverWait(self.driver, 10).until(
                        EC.element_to_be_clickable((By.XPATH, link_selector))
                    ):
                        self.driver.find_element(By.XPATH, link_selector).click()
                        time.sleep(30)  # Adjust the timing as needed

                        first_video_player = "/html/body/div[1]/div[2]/div/div/div[1]/div/article/div[3]/center/div/p[14]/a"
                        second_video_player = "/html/body/div[1]/div[2]/div/div/div[1]/div/article/div[3]/center/div/p[12]/a"

                        for player in [first_video_player, second_video_player]:
                            if WebDriverWait(self.driver, 10).until(
                                EC.element_to_be_clickable((By.XPATH, player))
                            ):
                                self.driver.find_element(By.XPATH, player).click()
                                time.sleep(10)  # Adjust the timing as needed
                                # Switch to the new tab that contains the video player
                                self.driver.switch_to.window(self.driver.window_handles[1])
                                elements = self.driver.find_elements(By.CSS_SELECTOR, "*")
                                for element in elements:
                                    if element.tag_name == "iframe" and element.get_attribute("src"):
                                        logger.info(f"Element: {element.get_attribute('outerHTML')}")
                                        try:
                                            video_url = element.get_attribute("src")
                                        except Exception as e:
                                            logger.error(f"Error getting video URL: {e}")
                                            continue

                                        self.driver.get(video_url)
                                        elements = self.driver.find_elements(By.CSS_SELECTOR, "*")
                                        for element in elements:
                                            if element.tag_name == "video" and element.get_attribute("src") and element.get_attribute("src").endswith(".mp4"):
                                                logger.info(f"Element: {element.get_attribute('outerHTML')}")
                                                try:
                                                    video_url = element.get_attribute("src")
                                                except Exception as e:
                                                    logger.error(f"Error getting video URL: {e}")
                                                    continue

                                                logger.info(f"Video URL: {video_url}")
                                                response = requests.get(video_url, stream=True)
                                                with open(f"E:\\Plex\\Teri Meri Doriyaann\\{datetime.datetime.now().strftime('%m-%d-%Y')}.mp4", "wb") as f:
                                                    for chunk in response.iter_content(chunk_size=1024*1024):
                                                        logger.info(f"Writing chunk {chunk}")
                                                        if chunk:
                                                            f.write(chunk)
                                                            logger.info(f"Chunk {chunk} written")
                                                            break

                except Exception as e:
                    logger.error(f"Error in extract_video_links: {e}")

            def close_browser(self):
                self.driver.quit()

Video Scraper Class

VideoScraper manages the scraping process, from initializing the web driver to saving the extracted video links.

    # Video Scraper
    class VideoScraper:
    def **init**(self):
    self.user = os.getlogin()
    self.selenium = None

        def setup_driver(self):
            # Set up ChromeDriver service
            service = Service()
            options = webdriver.ChromeOptions()
            options.add_argument(f"--user-data-dir=C:\\Users\\{self.user}\\AppData\\Local\\Google\\Chrome\\User Data")
            options.add_argument("--profile-directory=Default")
            return webdriver.Chrome(service=service, options=options)

        def start_scraping(self):
            try:
                self.selenium = SeleniumAutomation(self.setup_driver())
                self.selenium.open_target_page("https://www.desi-serials.cc/watch-online/star-plus/teri-meri-doriyaann/")
                videos = self.selenium.extract_video_links()
                self.save_videos(videos)
            finally:
                if self.selenium:
                    self.selenium.close_browser()

        def save_videos(self, videos):
            with open("desi_serials_videos.json", "w", encoding="utf-8") as file:
                json.dump(videos, file, ensure_ascii=False, indent=4)

Running the Scraper

The script execution brings together all the components of the scraping process.

    if **name** == "**main**":
        os.system("taskkill /im chrome.exe /f")
        scraper = VideoScraper()
        scraper.start_scraping()

Conclusion

This script demonstrates using Python's web scraping capabilities for specific content access. It highlights the use of Selenium for browser automation and BeautifulSoup for HTML parsing. While focused on a specific TV show, the methodology is adaptable for various web scraping tasks.

Use such scripts responsibly and within legal and ethical boundaries. Happy scraping and coding!

References

Automating DVR Surveillance Feed Analysis Using Selenium and Python

Introduction

In an era where security and monitoring are paramount, leveraging technology to enhance surveillance systems is crucial. Our mission is to automate the process of capturing surveillance feeds from a DVR system for analysis using advanced computer vision techniques. This task addresses the challenge of accessing live video feeds from DVRs that do not readily provide direct stream URLs, such as RTSP, which are essential for real-time video analysis.

The Challenge

Many DVR (Digital Video Recorder) systems, especially older models or those using proprietary software, do not offer an easy way to access their video feeds for external processing. They often stream video through embedded ActiveX controls in web interfaces, which pose a significant barrier to automation due to their closed nature and security restrictions.

Our Approach

To overcome these challenges, we propose a method that automates a web browser to periodically capture screenshots of the DVR's camera screens. These screenshots can then be analyzed using a computer vision model to transcribe or interpret the activities captured by the cameras. Our tools of choice are Selenium, a powerful tool for automating web browsers, and Python, a versatile programming language with extensive support for image processing and machine learning.

Step-by-Step Guide

  • Setting Up the Environment Selenium WebDriver: Install Selenium WebDriver compatible with your intended browser. Python Environment: Set up a Python environment with the necessary libraries (selenium, datetime, etc.).
  • Browser Automation Navigate to DVR Interface: Use Selenium to open the browser and navigate to the DVR's web interface. Handle Authentication: Automate the login process to access the camera feeds.
  • Capturing Screenshots Regular Intervals: Implement a loop in Python to capture and save screenshots of the camera feed every five seconds. Timestamped Filenames: Save the screenshots with timestamps to ensure uniqueness and facilitate chronological analysis.
  • Analyzing the Captured Screenshots Vision Model Selection: Choose a suitable computer vision model for analyzing the screenshots based on the required analysis (e.g., object detection, and movement tracking). Processing Screenshots: Feed the screenshots to the vision model either in real-time or in batches for analysis.
  • Continuous Monitoring Long-term Operation: Ensure the script can run continuously to monitor the surveillance feed over extended periods.
  • Error Handling: Implement robust error handling to manage browser timeouts, disconnections, or other potential issues.

Purpose and Benefits

This automated approach is designed to enhance surveillance systems where direct access to video streams is not available. By analyzing the DVR feeds, it can be used for various applications such as:

Security Monitoring: Detect unauthorized activities or security breaches. Data Analysis: Gather data over time for pattern recognition or anomaly detection. Event Documentation: Keep a record of events with timestamps for future reference.

Conclusion

While this approach offers a workaround to the limitations of certain DVR systems, it highlights the potential of integrating modern technology with existing surveillance infrastructure. The combination of Selenium's web automation capabilities and Python's powerful data processing and machine learning libraries opens up new avenues for enhancing security and surveillance systems.

Important Note

This method, while innovative, is a workaround and has limitations compared to direct video stream access. It is suited for scenarios where no other direct methods are available and real-time processing is not a critical requirement.

Productivity Tools in 2024

Notetaking and Task Management

In my attempt to cut down on subscriptions in 2024, I'll be switching to Microsoft Visual Studio Code with GitHub Copilot as my go-to AI assistant in helping me churn out more content for my blog and YouTube channel.

I'll be switching to a productivity toolset consisting of Evernote with Kanbanote, Anki, Raindrop.io, and Google Calendar. I want to be more note-focused than ever with data-hungry Large Language Models (LLMs) becoming more of a norm.

I've gone through my personal Apple subscriptions and canceled all of them, these are separate from my shared family subscriptions such as Chaupal, a Punjabi, Bhojpuri, and Haryanvi video streaming service. I've also canceled my MidJourney and ChatGPT subscriptions. I intend on using fewer applications so I can utilize the most of what I have and if I do start using a new subscription service I'll be sure to buy residential Turkish proxies to get the best price whilst keeping my running total of subscriptions to a minimum.

Accordingly, some other subscription services I need to check Turkish pricing for are:

  • ElevanLabs
  • Grammarly
  • Dropbox

To sum up my 2024 productivity stack:

  • Microsoft Visual Studio Code
  • GitHub Copilot
  • Evernote
  • Kanbanote
  • Raindrop.io
  • Google Calendar

Useful links:

  1. IP Burger for Turkish residential proxies
  2. Prepaid Credit Card for Turkish subscriptions

Microsoft Visual Studio Code

Microsoft Visual Studio Code is a free source-code editor made by Microsoft for Windows, Linux, and macOS.

Password Manager

RoboForm

RoboForm is a password manager and form filler tool that automates password entering and form filling, developed by Siber Systems, Inc. It is available for many web browsers, as a downloadable application, and as a mobile application. RoboForm stores web passwords on its servers, and offers to synchronize passwords between multiple computers and mobile devices. RoboForm offers a Family Plan for up to 5 users which I share with my family.

Theme

Dracula Theme is a dark theme for programs Alacritty, Alfred, Atom, BetterDiscord, Emacs, Firefox, Gnome Terminal, Google Chrome, Hyper, Insomnia, iTerm, JetBrains IDEs, Notepad++, Slack, Sublime Text, Terminal.app, Vim, Visual Studio, Visual Studio Code, Windows Terminal, and Xcode.

With it's easy-on-the-eyes color scheme, Dracula Theme is on my list of must-have themes for any application I use.

Transferring Script Files to Local System or VPS

Transferring Script Files to Local System or VPS

Local System Setup Process (Windows)

This document outlines the process for transferring a Python script and setting it up on your local system. The script, in this case, is a Facebook Marketplace Scraper that allows you to collect and manage data from online listings.

Prerequisites

Before proceeding with the setup, ensure you have the following prerequisites ready:

  • Python installed on your system (Python 3.6 or higher is recommended).
  • Access to a Google Cloud project with required credentials for Google Sheets API.
  • SQLite database support.
  • A Telegram bot token (if you wish to receive notifications).
  • Dependencies listed in the requirements.txt file provided with the script.

Setup Steps

Step 1: Obtain Script Files

1.1. Obtain the necessary script files from your source, typically provided as a ZIP archive or downloadable files. 1.2. Ensure you have the following script files:

  • fb_parser.py: The main Python script.
  • requirements.txt: A file containing the required Python dependencies.

Step 2: Install Dependencies

2.1. Open a terminal/command prompt and navigate to the directory containing the script files. 2.2. Install the required Python dependencies using the following command:

pip install -r requirements.txt
This command installs packages such as requests, beautifulsoup4, and others.

Step 3: Configure Credentials

3.1. Set up Google Cloud credentials for accessing the Google Sheets API:

  • Create or use an existing Google Cloud project.
  • Enable the Google Sheets API for your project.
  • Create OAuth 2.0 credentials for a desktop application and download the credentials.json file.
  • Place the credentials.json file in the same directory as the script.

Step 4: Initialize the Database

4.1. Initialize the SQLite database by running the following command in the script's directory:

python fb_parser.py --initdb

This command creates the SQLite database file (market_listings.db) in the script's directory.

Step 5: Configure Telegram Bot Token (Optional)

5.1. If you want to receive notifications via Telegram, edit the fb_parser.py script and update the bot_token and bot_chat_id variables with your own values.

Step 6: Run the Scraper

6.1. Start the scraper by running the following command in the script's directory:

python fb_parser.py

The scraper will begin collecting data from Facebook Marketplace listings, and notifications will be sent if configured.

Step 7: Monitor and Review

7.1. Monitor the script's output for any messages or errors. 7.2. Review the Google Sheets document to ensure that it's collecting data accurately.

Step 8: Ongoing Management

8.1. Consider setting up automated scheduling, if required, to run the scraper at specific intervals.

VPS Setup Process

Overview

This document outlines the process for transferring a Python script and setting it up on your VPS (Virtual Private Server). The script, in this case, is a Facebook Marketplace Scraper designed to collect and manage data from online listings.

Prerequisites

Before proceeding with the setup, ensure you have the following prerequisites ready:

  1. Access to a VPS: You should have access to a VPS with administrative privileges. You can obtain VPS services from providers like AWS, DigitalOcean, or any other preferred hosting provider.

  2. Operating System: The VPS should be running a compatible operating system, preferably a Linux distribution such as Ubuntu or CentOS.

  3. Python Installed: Python 3.6 or higher should be installed on your VPS. You can check the installed Python version using the python3 --version command.

  4. Access to SSH: Ensure you can access your VPS via SSH (Secure Shell) with a terminal or SSH client.

  5. Script Files: Obtain the necessary script files for the Facebook Marketplace Scraper. These files are typically provided as a ZIP archive or downloadable files.

  6. Dependencies: Review the script's documentation to identify and install any required Python dependencies.

Setup Steps

Step 1: Access Your VPS

  • Log in to your VPS using SSH. You should have received SSH credentials from your hosting provider.
    ssh username@hostname
    
    Replace username with your VPS username and your-vps-ip with the actual IP address or hostname of your VPS.

Step 2: Upload Script Files

  • Transfer the necessary script files to your VPS. You can use secure file transfer methods like SCP or SFTP to upload files from your local machine to the VPS.

Step 3: Install Python Dependencies

  • Install the required Python dependencies on your VPS. Use the package manager appropriate for your Linux distribution. For example, on Ubuntu, you can use apt-get:
    sudo apt-get update
    sudo apt-get install python3-pip
    pip3 install -r requirements.txt
    
    Replace requirements.txt with the actual filename containing the dependencies.

Step 4: Configure Credentials

  • Set up any necessary credentials for the script. This may include configuring API keys, OAuth tokens, or other authentication details required for your specific use case.
Google Sheets API
  1. Go to the Google Cloud Console.
  2. Create a new project if you don't have one.
  3. In the project dashboard, navigate to "APIs & Services" > "Credentials."
  4. Click on "Create credentials" and choose "OAuth client ID."
  5. Configure the OAuth consent screen with the necessary details.
  6. Select "Desktop App" as the application type.
  7. Create the OAuth client ID.
  8. Download the JSON credentials file (usually named credentials.json).
Telegram Bot API (Chat ID)
  1. Message the parser bot on Telegram.
  2. Navigate to the following URL in your browser:
    https://api.telegram.org/bot<yourtoken>/getUpdates
    
    Replace <yourtoken> with your bot's token.
  3. Look for the "chat" object in the response. The "id" value is your chat ID.

Step 5: Execute the Script

  • Run the Python script on your VPS. Navigate to the directory where you uploaded the script files and execute it.

    python3 fb_parser.py
    
    Replace fb_parser.py with the actual filename of the script.

  • Monitor the script's output for any messages or errors. Depending on your VPS setup, you may choose to run the script in the background using tools like nohup or within a screen session for detached operation.

Step 6: Ongoing Management

  • Consider setting up automated scheduling, if required, to run the scraper at specific intervals. You can use tools like cron for scheduling periodic tasks on your VPS.

Conclusion

Transferring script files to your local system or VPS to set up a Facebook Marketplace Scraper is a straightforward process. By following the steps outlined in this document, you can quickly get started with the scraper and begin collecting data from online listings.

References

Hosting MkDocs Documentation on GitHub Pages

This guide will walk you through the process of hosting your MkDocs documentation on GitHub Pages. By following these steps, you can make your documentation accessible online and easily share it with others.

Prerequisites

Before you begin, make sure you have the following prerequisites in place:

  • A MkDocs project set up on your local machine.
  • A GitHub account where you can create a new repository.

Steps

1. Create a GitHub Repository

  1. Go to your GitHub account and log in.

  2. Click on the "New" button to create a new repository.

  3. Enter a name for your repository, choose whether it should be public or private, and configure other repository settings as needed. Then, click "Create repository."

2. Push Your MkDocs Project to GitHub

To host your MkDocs documentation on GitHub, you need to push your local project to your GitHub repository. Follow these steps:

# Initialize a Git repository in your MkDocs project folder (if not already initialized)
cd /path/to/your/mkdocs/project
git init

# Add all the files to the Git repository and commit them
git add .
git commit -m "Initial commit"

# Link your local Git repository to your GitHub repository (replace placeholders)
git remote add origin https://github.com/your-username/your-repo.git

# Push your local repository to GitHub
git push -u origin master
Replace your-username with your GitHub username and your-repo with the name of your GitHub repository.

3. Enable GitHub Pages

GitHub Pages allows you to host static websites directly from your repository. To enable GitHub Pages for your MkDocs documentation, follow these steps:

  1. Go to your GitHub repository and click on the "Settings" tab.
  2. Scroll down to the "GitHub Pages" section and click on the "Source" dropdown menu.
  3. Select "master branch" as the source and click "Save."

4. Access Your Documentation Online

Once you have enabled GitHub Pages, your MkDocs documentation will be accessible online. To access it, go to the following URL:

https://your-username.github.io/your-repo/
Replace your-username with your GitHub username and your-repo with the name of your GitHub repository.

Conclusion

Hosting your documentation on GitHub Pages can have certain advantages in terms of accessibility and collaboration, but whether it's "safer" than keeping everything on your local device depends on your specific needs and security considerations. Here are some points to consider:

Advantages of Hosting on GitHub Pages:

  1. Accessibility: When you host your documentation on GitHub Pages, it becomes accessible online, allowing a wider audience to access it without requiring access to your local device.

  2. Version Control: GitHub provides robust version control capabilities. You can track changes, collaborate with others, and easily revert to previous versions if needed.

  3. Backup: Your documentation is stored on GitHub's servers, providing a level of backup. Even if your local device experiences issues, your documentation remains safe on GitHub.

  4. Collaboration: Hosting on GitHub allows for collaborative editing and contributions from team members or the open-source community.

  5. Availability: GitHub Pages offers high availability and uptime, ensuring your documentation is accessible to users around the world.

Security Considerations:

  1. Privacy: Make sure you understand the privacy settings of your GitHub repository. If your documentation contains sensitive information, you should keep it private and limit access.

  2. Authentication: Implement strong authentication methods for your GitHub account to prevent unauthorized access.

  3. Data Ownership: While GitHub is a reputable platform, consider that your data is hosted on third-party servers. Ensure you retain ownership of your documentation content.

  4. Backup Strategy: While GitHub provides backup, it's still a good practice to maintain your own backup of critical documentation on your local device or another secure location.

  5. Compliance: If you're subject to specific compliance regulations or security requirements, consult with your organization's IT/security team to ensure compliance when hosting documentation on third-party platforms.

In summary, hosting your documentation on GitHub Pages can enhance accessibility, collaboration, and version control. It can be a safer option for sharing and collaborating on non-sensitive documentation. However, security and privacy considerations should be evaluated, and you should ensure that your data remains secure and compliant with any applicable regulations.

Transferring Files Between WSL and Windows

ubuntu_kv3lhrpES3.png

Logging into Zomro VPS using WSL in Ubuntu CLI

To log into your Zomro VPS using WSL (Windows Subsystem for Linux) in the Ubuntu CLI, you can use the ssh command. Here are the steps to do it:

  • Open your Ubuntu terminal in WSL. You can do this by searching for "Ubuntu" in the Windows Start menu and launching it.
  • In the Ubuntu terminal, use the ssh command to connect to your Zomro VPS. Replace your_username with your actual username and your_server_ip with the IP address of your Zomro VPS:
ssh your_username@your_server_ip

For example, if your username is "root" and your server's IP address is "123.456.789.0," the command would be:

ssh root@123.456.789.0
  • Press Enter after entering the command. You will be prompted to enter your password for the VPS.
  • After entering the correct password, you should be logged into your Zomro VPS via SSH. You will see a command prompt for your VPS, and you can start running commands on the remote server.

ubuntu_L3cnasikdi.png

That's it! You have successfully logged into your Zomro VPS using WSL's Ubuntu CLI. You can now manage your server and perform various tasks as needed.

Locating File Paths in Ubuntu CLI

In Ubuntu CLI (Command Line Interface), it's essential to know how to find the file paths of directories and files. This knowledge allows you to navigate your file system effectively and reference files for various tasks. Here are some useful commands and techniques for locating file paths:

Present Working Directory (pwd)

The pwd command stands for "Present Working Directory" and displays the absolute path of your current location within the file system. Simply enter the following command:

pwd

The terminal will respond with the absolute path to your current directory, helping you understand where you are in the file system.

Listing Directory Contents (ls)

The ls command is used to list the contents of a directory. When executed without any arguments, it displays the files and subdirectories in your current directory. For example:

ls

This command will list the files and directories in your current location.

Finding a File (find)

If you need to locate a specific file within your file system, you can use the find command. Specify the starting directory and the filename you're looking for. For example, to find a file named "example.txt" starting from the root directory, use:

find / -name example.txt

This command will search the entire file system for "example.txt" and display its path if found.

The cd command allows you to change directories and move through the file system. You can use it to navigate to specific locations. For instance, to move to a directory named "documents," use:

cd documents

You can also use relative paths, such as cd .. to go up one level or cd /path/to/directory to specify an absolute path.

File Explorer Integration

In many cases, you can easily locate file paths by using a graphical file explorer like Windows File Explorer. WSL allows you to access your Windows files and directories under the /mnt directory. For example, your Windows C: drive is typically accessible at /mnt/c/.

Understanding how to locate file paths in Ubuntu CLI is crucial for efficient file management and navigation. These commands and techniques will empower you to work effectively with your files and directories.

Transferring Files from WSL to Windows

Transferring files from your WSL (Windows Subsystem for Linux) environment to your Windows system is a common task and can be done using several methods. I’ll be discussing the Secure Copy method in this tutorial.

Using SCP (Secure Copy)

You can transfer files from WSL using the scp (Secure Copy) command. Here's the syntax:

scp username@WindowsIP:/path/to/source/file /path/to/destination/in/WSL/
  • username: Your Windows username.
  • WindowsIP: The IP address or hostname of your Windows system.
  • /path/to/source/file: The path to the file in your Windows file system that you want to copy.
  • /path/to/destination/in/WSL/: The destination path in your WSL environment.

For example, to copy all files located in /root/zomro-selenium-base/screenshots/* to your Windows Desktop, you can use:

scp root@45.88.107.136:/root/zomro-selenium-base/screenshots/* "/mnt/c/Users/Harminder Nijjar/Desktop/"

This command will copy all files in /root/zomro-selenium-base/screenshots/ to your Windows Desktop. Make sure to adjust the source and destination paths as needed for your specific use case.

Conclusion

Transferring files between WSL and Windows is a common operation and can be accomplished using the Secure Copy (SCP) command. Whether you need to copy files from WSL to Windows or from Windows to WSL, SCP provides a secure and efficient

Progress Update: RunescapeGPT - A Runescape ChatGPT Bot

Introduction

RunescapeGPT logo

RunescapeGPT is a project I started in order to create an AI-powered color bot for Runescape with enhanced capabilities. I have been working on this project for a few days now, and I am excited to share my progress with you all. In this post, I will be discussing what I have done so far and what I plan to do next.

What I've Done So Far

2021-11-16

I have created a GUI for the bot using Qt Creator. It is a simple GUI that is inspired by Sammich's AHK bot. It has all the buttons provided by Sammich's bot.

Here is a screenshot of Sammich's GUI:

Sammich's GUI

And here is the current state of RunescapeGPT's GUI:

RunescapeGPT's GUI

Although the GUI is not fully functional yet, it lays a solid foundation. The next steps in development include adding actionable functionality to the buttons. Initially, we'll start with a single script that has a hotkey to send a screenshot to the AI model. This will be a key feature for monitoring the bot's activity and ensuring its smooth operation.

The script will capture the current state of the game, including what the bot is doing at any given time, and send this information along with a screenshot to the AI model. This multimodal approach will allow the AI to analyze both the textual data and the visual context of the game, enabling it to make informed decisions about the bot's next actions.

Upcoming Features and Enhancements

  • Real-time Monitoring: Integrate a system to always have a variable that reflects the bot's current action.
  • Activity Log and Reporting: Keep a detailed log of the bot's last movement, including timestamps and the duration between actions, to identify and understand if something unusual occurs.
  • AI-Powered Decision Making: In the event of anomalies or breaks, the information, including the screenshot, will be sent to an AI model equipped with multimodal capabilities. This model will analyze the situation and guide the bot accordingly.

By implementing these features, RunescapeGPT will become more than just a bot; it will be a sophisticated AI companion that navigates the game's challenges with unprecedented efficiency.

Stay tuned for more updates as the project evolves!