Recent Posts

Featured image for Lock Windows 11 Remotely Using sleepwatcher Mac

Lock Windows 11 Remotely Using sleepwatcher Mac

In this guide, we will walk you through the process of remotely locking a Windows 11 computer from your Mac using sleepwatcher. This will require SSH access to your Windows machine configured with a public key instead of a password. Follow these steps to set up remote locking:

Prerequisites

  1. SSH Configuration: Ensure that you have SSH access to your Windows 11 computer from your Mac, and it is set up to use a public key for authentication instead of a password. If you haven’t set up SSH with public key authentication, you can find guides online for this process.

  2. Homebrew: Make sure you have Homebrew installed on your Mac. If you don’t have it, you can install it by following the instructions on the Homebrew website.

Featured image for Fixing The Backtick Key Issue With Barrier From Mac Server To Windows 11 Client

Fixing The Backtick Key Issue With Barrier From Mac Server To Windows 11 Client

If you’re experiencing issues with the backtick key (`) not working when using Barrier to connect a Mac Server to a Windows 11 Client, you’re not alone. This can be a frustrating problem, but fortunately, there is a solution.

Problem Description: When using Barrier, a software KVM (keyboard, video, mouse) switch, to control your Windows 11 Client from a Mac Server, the backtick key (`) might not function as expected. This issue can disrupt your workflow, especially if you rely on this key for tasks like entering command-line commands or writing code.

Featured image for Add -- - after tabs on VSCODE using Regex-

Add -- - after tabs on VSCODE using Regex-

To add “- " after tabs on Visual Studio Code (VSCode) using regex, you can follow these steps:

  1. Open VSCode.

  2. Press Ctrl + H (or Cmd + H on macOS) to open the Find and Replace panel.

  3. In the Find input box, input the following regular expression to match tabs at the beginning of each line:

    Code
    (^\t*)

    Make sure to enable the “Use Regular Expression” option by clicking the .* icon in the Find panel.

  4. In the Replace input box, input the following:

    Code
    $0- 

    This will insert “- " after each tab matched by the regular expression.

  5. Click “Replace All” in the Find and Replace panel.

Featured image for Check apt unattended upgrades will run today

Check apt unattended upgrades will run today

To check if unattended upgrades will run today, you can use the systemctl list-timers command with the apt-daily.timer unit. This will provide information about the timer and when it is scheduled to run. Here’s how you can do it:

bash
1
systemctl list-timers apt-daily.timer

Running this command will display output similar to the following:

Code
NEXT                          LEFT     LAST                          PASSED       UNIT                      ACTIVATES
Wed 2023-09-01 06:25:00 UTC  12h left Tue 2023-08-31 06:25:00 UTC  11h ago     apt-daily.timer           apt-daily.service

In this example output, you can see information about the next scheduled run of the apt-daily.timer unit, including the time remaining until it runs again. You can check the “NEXT” column to see when the timer is set to trigger next.

Featured image for Postgres Enable Password Login on Local

Postgres Enable Password Login on Local

To enable password login on a local PostgreSQL database, you need to modify the pg_hba.conf file and then restart the PostgreSQL service. Here are the steps in markdown format:

markdown
1
2
3
4
5
6
## Enable Password Login on Local PostgreSQL

1. Open the `pg_hba.conf` file for editing using a text editor. You can use `vim` as you mentioned or any other text editor of your choice. Replace `/usr/local/var/postgres/pg_hba.conf` with the correct path to your `pg_hba.conf` file if it's located elsewhere.

   ```shell
   vim /usr/local/var/postgres/pg_hba.conf
  1. In the pg_hba.conf file, locate the line that corresponds to the local connection method. It typically looks like this:

    shell
    1
    2
    
    # "local" is for Unix domain socket connections only
    local   all             all                                     trust
  2. Change the authentication method from “trust” to “md5.” Your modified line should look like this:

    shell
    1
    2
    
    # "local" is for Unix domain socket connections only
    local   all             all                                     md5

    This change ensures that local connections require a password.

  3. Save the pg_hba.conf file and exit the text editor.

  4. After modifying the configuration file, you need to restart the PostgreSQL service for the changes to take effect. You can use brew services to do this:

    shell
    1
    
    brew services restart postgres