Recent Posts

Featured image for Can't Open SQLite on WSL2 Windows 11

Can't Open SQLite on WSL2 Windows 11

SQLite is a popular, lightweight, and serverless database engine used in various applications. However, when working with SQLite on a Windows Subsystem for Linux (WSL2) in Windows 11, you may encounter issues related to file locking. In this article, we will explore the problem, its possible cause, and a solution to resolve it.

Problems

The primary issue you might face when trying to open an SQLite file located on WSL2 is that the database file is locked. This can prevent you from performing read and write operations on the database, making it challenging to work with SQLite effectively.

Featured image for Switch Virtual Desktop With Mouse Gesture on Windows 11

Switch Virtual Desktop With Mouse Gesture on Windows 11

If you want to switch virtual desktops with mouse gestures on Windows 11, you can use a third-party software called StrokeIt. StrokeIt is a mouse gesture recognition program that allows you to perform various actions by drawing gestures with your mouse.

Here’s how you can set up StrokeIt to switch virtual desktops on Windows 11:

  1. Download and Install StrokeIt:

    You can download StrokeIt from its official website here. Follow the installation instructions to set it up on your computer.

  2. Launch StrokeIt:

    Once installed, open StrokeIt by double-clicking its icon in the system tray or by searching for it in the Windows Start menu.

  3. Configure StrokeIt:

    StrokeIt provides a variety of predefined gestures, but you can create custom gestures for specific actions. To set up a gesture to switch virtual desktops:

    • Right-click on the StrokeIt icon in the system tray and select “Options.”
    • In the StrokeIt Configuration window, go to the “Actions” tab.
  4. Create a Gesture:

    • Click the “Add” button to create a new gesture.
    • In the “Action Name” field, enter a name for the gesture (e.g., “Switch Virtual Desktop”).
    • In the “Command” field, type the keyboard shortcut for switching virtual desktops in Windows 11. The default shortcut is Windows key + Ctrl + Left arrow to move to the previous desktop and Windows key + Ctrl + Right arrow to move to the next desktop.
  5. Record a Gesture:

    • Click the “Record” button.
    • Draw a mouse gesture in the provided area. For example, you can draw a right arrow for switching to the next desktop and a left arrow for switching to the previous one.
    • Click “Stop” when you’re done drawing the gesture.
  6. Assign the Gesture:

    • With the gesture recorded, select it from the list in the StrokeIt Configuration window.
    • In the “Action” dropdown menu, choose the action you just created (e.g., “Switch Virtual Desktop”).
  7. Save and Apply:

    • Click “Apply” and then “OK” to save your settings.
Featured image for Mi Band Record Incorrect In Bed Data on Sleep Variable of Health iOS

Mi Band Record Incorrect In Bed Data on Sleep Variable of Health iOS

If you’re experiencing issues with your Mi Band recording incorrect “In Bed” data on the Sleep variable in the Health app on iOS, there’s a simple solution you can try. This problem can often be resolved by adjusting your iOS device’s timezone settings. Here’s a step-by-step guide on how to do it:

Step 1: Open the Settings App on Your iOS Device

Unlock your iOS device and locate the “Settings” app on your home screen. It looks like a gear icon and is typically found on the first page of your apps.

Featured image for How to Login to a Shared Folder with Your Windows Account on Windows 11

How to Login to a Shared Folder with Your Windows Account on Windows 11

If you want to access a shared folder on Windows 11 using your Windows account password, follow these steps:

  1. Open Settings:

    • Click on the Start button (Windows logo) in the taskbar.
    • Click on the Settings (gear-shaped) icon to open the Windows Settings app.
  2. Navigate to Accounts:

    • In the Windows Settings app, click on the Accounts category.
  3. Change Sign-in Options:

    • Under the Accounts section, click on Sign-in options in the left sidebar.
  4. Disable Windows Hello (Recommended):

    • Look for the option that says “For improved security, only allow Windows Hello sign-in for Microsoft accounts on this device (Recommended).”
    • If this option is enabled, click on the switch to turn it off. You may be prompted to enter your current password to make this change.
  5. Access the Shared Folder:

    • After disabling Windows Hello, you can now access the shared folder.
    • Open File Explorer by pressing Win + E or by clicking on the folder icon in the taskbar.
  6. Connect to the Shared Folder:

    • In File Explorer, click on the Network tab on the left sidebar. This will display a list of available network devices and shared folders.
    • Locate the shared folder you want to access. It should appear under the list of network devices or under “Network Locations.”
  7. Login with Your Windows Account Password:

    • Double-click on the shared folder you want to access.
    • If prompted for credentials, enter your Windows account username and password. Make sure to specify your computer’s name or IP address as the domain if required (e.g., COMPUTERNAME\YourUsername or IP_Address\YourUsername).
    • If you want Windows to remember your credentials for future access, you can check the “Remember my credentials” or “Remember my password” option depending on the version of Windows 11.
  8. Access the Shared Folder:

    • Once you’ve successfully entered your credentials, you should be able to access the shared folder and its contents.
Featured image for How to See Currently Logged in Users in Windows 10 - 11

How to See Currently Logged in Users in Windows 10 - 11

If you want to see the currently logged-in users on a Windows 10 or Windows 11 system, you can use the Command Prompt and the query user command. Here’s a step-by-step guide on how to do it:

  1. Open Command Prompt: Press Win + X and select “Windows Terminal” or “Command Prompt” from the menu. You can also simply search for “Command Prompt” in the Windows search bar and open it.

  2. Run query user Command: In the Command Prompt window, type the following command and press Enter:

    Code
    query user

    This command will display a list of all currently logged-in users on your Windows system.

  3. Review the List: After running the command, you will see a table with information about the logged-in users. The table typically includes details such as the username, session name, ID, and state.

Featured image for Building a Go Application with Docker: Optimized Dockerfile

Building a Go Application with Docker: Optimized Dockerfile

In this article, we will walk through the creation of an optimized Dockerfile for building and running a Go application. This Dockerfile will focus on building only the binary of the Go application, resulting in a smaller and more efficient Docker image.

markdown
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Dockerfile for Building a Go Application

```Dockerfile
# Stage 1: Build the Go Binary
FROM golang:1.17 as builder

# Set the working directory inside the container
WORKDIR /app

# Copy the Go application source code into the container
COPY . .

# Set environment variables
ENV CGO_ENABLED=0

# Fetch dependencies and build the Go binary
RUN go get -d -v ./...
RUN go build -o /tmp/api-server .

# Stage 2: Create a minimal runtime image
FROM scratch

# Copy the binary from the builder stage into the minimal image
COPY --from=builder /tmp/api-server /usr/bin/api-server

# Define the command to run when the container starts
CMD ["api-server", "start"]

In this Dockerfile, we use a multi-stage build to optimize the final Docker image. Here’s a breakdown of what each section does: