Lanedirt.tech https://lanedirt.com Tech tips Thu, 31 Jul 2025 11:56:38 +0000 en-US hourly 1 https://wordpress.org/?v=5.8.13 https://lanedirt.com/wp-content/uploads/2021/11/cropped-Logo-03-32x32.png Lanedirt.tech https://lanedirt.com 32 32 Export all filenames in a directory to a CSV file via Powershell https://lanedirt.com/2025/07/export-all-filenames-in-a-directory-to-a-csv-file-via-powershell/ https://lanedirt.com/2025/07/export-all-filenames-in-a-directory-to-a-csv-file-via-powershell/#respond Thu, 31 Jul 2025 11:56:38 +0000 https://lanedirt.com/?p=731 You can run this snippet in Powershell in any folder (on Windows) and it will create a CSV with all filenames in that folder.

The post Export all filenames in a directory to a CSV file via Powershell appeared first on Lanedirt.tech.

]]>
You can run this snippet in Powershell in any folder (on Windows) and it will create a CSV with all filenames in that folder.

Get-ChildItem -File | Select-Object Name, FullName, Length, LastWriteTime |
    Export-Csv -Path ".\FileList.csv" -NoTypeInformation -Encoding UTF8 -Delimiter ";"

The post Export all filenames in a directory to a CSV file via Powershell appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2025/07/export-all-filenames-in-a-directory-to-a-csv-file-via-powershell/feed/ 0
Pause chrome DOM via delay https://lanedirt.com/2025/02/pause-chrome-dom-via-delay/ https://lanedirt.com/2025/02/pause-chrome-dom-via-delay/#respond Wed, 05 Feb 2025 13:38:26 +0000 https://lanedirt.com/?p=725 This is a handy tip: in order to debug certain Chrome browser events which only happen during mouseover or onFocus events, you can type the following into the console which will make the DOM pause execution after a 3 second delay: This allows you to make the behaviour happen manually, and after the delay the… Continue reading Pause chrome DOM via delay

The post Pause chrome DOM via delay appeared first on Lanedirt.tech.

]]>
This is a handy tip: in order to debug certain Chrome browser events which only happen during mouseover or onFocus events, you can type the following into the console which will make the DOM pause execution after a 3 second delay:

setTimeout(function(){debugger;}, 3000)

This allows you to make the behaviour happen manually, and after the delay the DOM will pause giving you the opportunity to inspect it as it was at that exact moment.

The post Pause chrome DOM via delay appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2025/02/pause-chrome-dom-via-delay/feed/ 0
Fixing Docker Desktop Startup Issue on Windows 10/11 VM in Proxmox https://lanedirt.com/2025/01/fixing-docker-desktop-startup-issue-on-windows-10-11-vm-in-proxmox/ https://lanedirt.com/2025/01/fixing-docker-desktop-startup-issue-on-windows-10-11-vm-in-proxmox/#respond Thu, 30 Jan 2025 10:35:53 +0000 https://lanedirt.com/?p=716 If you’re running a Windows 10/11 virtual machine (VM) in Proxmox and install Docker Desktop, you might encounter an issue where the VM fails to start and gets stuck on the “startup recovery” screen. This can be caused by nested virtualization not being (fully) enabled in your Proxmox environment. Solution: Enable Nested Virtualization in Proxmox… Continue reading Fixing Docker Desktop Startup Issue on Windows 10/11 VM in Proxmox

The post Fixing Docker Desktop Startup Issue on Windows 10/11 VM in Proxmox appeared first on Lanedirt.tech.

]]>
If you’re running a Windows 10/11 virtual machine (VM) in Proxmox and install Docker Desktop, you might encounter an issue where the VM fails to start and gets stuck on the “startup recovery” screen. This can be caused by nested virtualization not being (fully) enabled in your Proxmox environment.

Solution: Enable Nested Virtualization in Proxmox

To resolve this issue, follow these steps to ensure nested hardware-assisted virtualization is enabled:

1. Check if Nested Virtualization is Enabled

You can check whether nested virtualization is enabled by running the following command on your Proxmox host:

For Intel CPUs:

cat /sys/module/kvm_intel/parameters/nested

For AMD CPUs:

cat /sys/module/kvm_amd/parameters/nested

If the output is N, it means nested virtualization is not enabled. If output is Y, skip to step 3.

2. Enable Nested Virtualization

For Intel CPUs, run:

echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf

For AMD CPUs, run:

echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf

Then, reload the kernel module:

modprobe -r kvm_intel  # For Intel
modprobe kvm_intel      # For Intel

For AMD:

modprobe -r kvm_amd  # For AMD
modprobe kvm_amd     # For AMD

Check again to confirm:

cat /sys/module/kvm_intel/parameters/nested  # For Intel
cat /sys/module/kvm_amd/parameters/nested    # For AMD

The output should now be Y.

3. Manually Edit the VM Configuration File (If Necessary)

If enabling nested virtualization does not resolve the issue, manually edit the Proxmox VM configuration file.

  1. Open a terminal on the Proxmox host.
  2. Edit the VM configuration file:
    cd /etc/pve/qemu-server/
    nano [vm-id].conf
  3. Add the following line to the configuration file (or append if “args” already exists):
    args: -cpu Cooperlake,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,+vmx
  4. Save the file and reboot the VM.

Step 3 above worked for me with Proxmox VE 8.1.4.

The post Fixing Docker Desktop Startup Issue on Windows 10/11 VM in Proxmox appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2025/01/fixing-docker-desktop-startup-issue-on-windows-10-11-vm-in-proxmox/feed/ 0
Add docker compose exec bash alias https://lanedirt.com/2025/01/add-docker-compose-exec-bash-alias/ https://lanedirt.com/2025/01/add-docker-compose-exec-bash-alias/#respond Thu, 16 Jan 2025 13:30:16 +0000 https://lanedirt.com/?p=713 If you’re frequently using the docker compose exec command and want a faster way to access your Docker containers, this guide will show you how to create a simple alias or function in your .zshrc file on macOS. Step 1: open your .zshrc file Step 2: Add the de Function Scroll to the bottom of… Continue reading Add docker compose exec bash alias

The post Add docker compose exec bash alias appeared first on Lanedirt.tech.

]]>
If you’re frequently using the docker compose exec command and want a faster way to access your Docker containers, this guide will show you how to create a simple alias or function in your .zshrc file on macOS.

Step 1: open your .zshrc file

nano ~/.zshrc

Step 2: Add the de Function

Scroll to the bottom of the file and add the following function:

de() {
    if [ -z "$1" ]; then
        echo "Usage: de <container-name>"
        return 1
    fi
    docker compose exec -it "$1" bash
}

Save the file via Ctrl + X, press Y then enter.

Step 3: Reload shell configuration

Reload the .zshrc file so the new de command is immediately available:

source ~/.zshrc

Step 4: Use the New Command

de ogamex-app

This will execute:

docker compose exec -it ogamex-app bash

The post Add docker compose exec bash alias appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2025/01/add-docker-compose-exec-bash-alias/feed/ 0
SQL script to update records in table row-by-row by using cursor https://lanedirt.com/2024/11/sql-script-to-update-records-in-table-row-by-row-cursor/ https://lanedirt.com/2024/11/sql-script-to-update-records-in-table-row-by-row-cursor/#respond Mon, 18 Nov 2024 10:31:10 +0000 https://lanedirt.tech/?p=634 The MS SQL script below can be used to update records in a table row-by-row by using a cursor.

The post SQL script to update records in table row-by-row by using cursor appeared first on Lanedirt.tech.

]]>
The MS SQL script below can be used to update records in a table row-by-row by using a cursor.

/**
 * The script below demonstrates how to perform row-by-row updates in SQL instead of bulk updates. 
 * This is particularly useful in scenarios where certain triggers only fire for single row updates 
 * and do not process bulk updates. By updating records one by one, you can ensure triggers behave 
 * as intended, allowing for correct API synchronization or similar workflows.
 */

DECLARE @CurrentRecordId AS uniqueidentifier;
DECLARE @UpdatedRowCount INT;

SET @UpdatedRowCount = 0;

-- Define a SELECT query to retrieve the IDs of the records to be updated
DECLARE record_cursor CURSOR FOR
  SELECT [RecordID]
  FROM   exampletables.ExampleTable

OPEN record_cursor;

FETCH NEXT FROM record_cursor INTO @CurrentRecordId;

WHILE @@FETCH_STATUS = 0
  BEGIN
      UPDATE exampletables.ExampleTable
      SET    [ChangedDate] = GETDATE()
      WHERE  [RecordID] = @CurrentRecordId;

	  SET @UpdatedRowCount = @UpdatedRowCount + 1;
      FETCH NEXT FROM record_cursor INTO @CurrentRecordId;
  END;

CLOSE record_cursor;

DEALLOCATE record_cursor;

PRINT 'Total number of records updated:';
PRINT @UpdatedRowCount;

The post SQL script to update records in table row-by-row by using cursor appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2024/11/sql-script-to-update-records-in-table-row-by-row-cursor/feed/ 0
Git how to find all commits where string was mentioned https://lanedirt.com/2024/05/git-how-to-find-all-commits-where-string-was-mentioned/ https://lanedirt.com/2024/05/git-how-to-find-all-commits-where-string-was-mentioned/#respond Wed, 22 May 2024 10:18:22 +0000 https://lanedirt.tech/?p=696 You can use the following Git commands to find commits where a string was added/modified/deleted. This can be helpful to find commits where a certain method was added, modified, deleted or usages were added/deleted. 1. Find commits where method was mentioned. Powershell script (for Windows)

The post Git how to find all commits where string was mentioned appeared first on Lanedirt.tech.

]]>
You can use the following Git commands to find commits where a string was added/modified/deleted. This can be helpful to find commits where a certain method was added, modified, deleted or usages were added/deleted.

1. Find commits where method was mentioned.

Powershell script (for Windows)

 # Replace 'YourMethodName' with the string you want to search for
$searchString = 'YourMethodName'

# Get the list of commits where the string appears in diffs
$commits = git log -G $searchString --pretty=format:"%H"

# Loop through each commit and show the diff with the specific lines
foreach ($commit in $commits) {
    # Get the commit details (date, author, message)
    $commitDetails = git show $commit --pretty=format:"Commit: %H`nAuthor: %an`nDate: %ad`nMessage: %s`n" --no-patch

    # Display the separator header
    Write-Host "-----" -ForegroundColor Yellow
    Write-Host 

    # Display the commit details with colors
    $details = $commitDetails -split "`n"
    Write-Host $details[0]
    Write-Host $details[1]
    Write-Host $details[2]
    Write-Host $details[3]
    Write-Host

    # Get the diff for the commit
    $diff = git show $commit --pretty="" --no-prefix

    # Split the diff into lines
    $diffLines = $diff -split "`n"

    # Initialize variables
    $currentFile = ""
    $relevantLines = @{}

    # Process each line in the diff
    foreach ($line in $diffLines) {
        if ($line -match '^diff --git a\/(.+?) b\/\1$') {
            # Extract the filename from the diff line
            $currentFile = $matches[1]
        } elseif ($line -match "(\+|\-).*${searchString}") {
            # Add the line to the relevant lines for the current file
            if (-not $relevantLines.ContainsKey($currentFile)) {
                $relevantLines[$currentFile] = @()
            }
            $relevantLines[$currentFile] += $line
        }
    }

    # Display the relevant lines grouped by filename
    foreach ($file in $relevantLines.Keys) {
        Write-Host "File: $file" -ForegroundColor Yellow
        foreach ($line in $relevantLines[$file]) {
            if ($line -match '^\+.*') {
                Write-Host $line -ForegroundColor Green
            } elseif ($line -match '^\-.*') {
                Write-Host $line -ForegroundColor Red
            } else {
                Write-Host $line
            }
        }
        Write-Host
    }
} 

The post Git how to find all commits where string was mentioned appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2024/05/git-how-to-find-all-commits-where-string-was-mentioned/feed/ 0
Generate self-signed SSL certificate on Windows Server with Powershell https://lanedirt.com/2024/05/generate-self-signed-ssl-certificate-on-windows-server-with-powershell/ https://lanedirt.com/2024/05/generate-self-signed-ssl-certificate-on-windows-server-with-powershell/#respond Wed, 01 May 2024 11:32:31 +0000 https://lanedirt.tech/?p=685 Use the Powershell command below to generate a self-signed SSL certificate on a Windows Server 2019+. Make sure you run the Powershell Window as Administrator. Step 1: Generate self-signed certificate with one CN name. The command below generates the SSL certificate and automatically imports it to the local machine certificates in this folder: “Local Computer\Personal\Certificates”.… Continue reading Generate self-signed SSL certificate on Windows Server with Powershell

The post Generate self-signed SSL certificate on Windows Server with Powershell appeared first on Lanedirt.tech.

]]>
Use the Powershell command below to generate a self-signed SSL certificate on a Windows Server 2019+. Make sure you run the Powershell Window as Administrator.

Step 1: Generate self-signed certificate with one CN name.

The command below generates the SSL certificate and automatically imports it to the local machine certificates in this folder: “Local Computer\Personal\Certificates”.

New-SelfSignedCertificate -DnsName myserver.local -CertStoreLocation cert:\LocalMachine\My

(Tip) generate self-signed certificate with multiple CN names.

If you wish to include multiple DNS entries in a single certificate, separate multiple entries by a comma “,” like this:

New-SelfSignedCertificate -DnsName myserver.local, altname1.local, altname2.local, altname3.local -CertStoreLocation cert:\LocalMachine\My

Step 2 (optional): generate self-signed certificate and add it to the trusted Root Store on local machine.

For certain applications such as Report Server the used certificate needs to be trusted by the local machines Root Store. In order to do this, you can use the following one-liner statement.

Careful: you should only apply execute this command on development or testing machines.

$cert = New-SelfSignedCertificate -DnsName myserver.local -CertStoreLocation cert:\LocalMachine\My; $store = New-Object System.Security.Cryptography.X509Certificates.X509Store -ArgumentList 'Root', 'LocalMachine'; $store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite); $store.Add($cert); $store.Close();

Step 3: View your self-signed certificate with “Manage computer certificates”

Open the “Manager computer certificates” from the Windows Start Menu. Then go to:

  • Certificates – Local Computer
    • Personal
      • Certificates

In the right hand side you should see the generated certificate. You can now use this certificate in for example IIS or Report Server.

The post Generate self-signed SSL certificate on Windows Server with Powershell appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2024/05/generate-self-signed-ssl-certificate-on-windows-server-with-powershell/feed/ 0
Fix maxJsonLength error in ASP.NET MVC 4 applications https://lanedirt.com/2024/01/fix-maxjsonlength-error-in-asp-net-mvc-4-applications/ https://lanedirt.com/2024/01/fix-maxjsonlength-error-in-asp-net-mvc-4-applications/#respond Wed, 31 Jan 2024 11:33:15 +0000 https://lanedirt.tech/?p=673 Are you running into the following error in a ASP.NET Framework 4.x MVC project, and have already tried changing the max response values in web.config? Error: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. Solution: If you are using the Json()… Continue reading Fix maxJsonLength error in ASP.NET MVC 4 applications

The post Fix maxJsonLength error in ASP.NET MVC 4 applications appeared first on Lanedirt.tech.

]]>
Are you running into the following error in a ASP.NET Framework 4.x MVC project, and have already tried changing the max response values in web.config?

Error:

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Solution:

If you are using the Json() return method in your MVC controller, then the solution below will most likely fix the problem for you. The default Json() return method implementation has a MaxJsonLength limit defined which does not always respect the value set in web.config. In order to change the MaxJsonLength we can override the Json() method ourselves with the following code. Add this code to your MVC controller:

        /// <summary>
        /// Overrides the default Json() method to remove the limit on MaxJsonLength. This is essential for handling larger AJAX JSON responses successfully.
        /// In scenarios where the number of records returned increases significantly (e.g., from 100 to 500 or 1000), the default Json() method's length limit can lead to failures. 
        /// This override addresses that issue by setting the MaxJsonLength to the maximum possible integer value, effectively making it unlimited.
        /// </summary>
        /// <param name="data">The data to serialize.</param>
        /// <param name="contentType">The content type of the response.</param>
        /// <param name="contentEncoding">The content encoding of the response.</param>
        /// <param name="behavior">The JSON request behavior.</param>
        /// <returns>A JsonResult object with an unlimited MaxJsonLength.</returns>
        protected override JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding, JsonRequestBehavior behavior)
        {
            return new JsonResult()
            {
                Data = data,
                ContentType = contentType,
                ContentEncoding = contentEncoding,
                JsonRequestBehavior = behavior,
                MaxJsonLength = Int32.MaxValue
            };
        }

Afterwards, rebuild your project and try again to see if the error is fixed now.

The post Fix maxJsonLength error in ASP.NET MVC 4 applications appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2024/01/fix-maxjsonlength-error-in-asp-net-mvc-4-applications/feed/ 0
Linux display SSL cert of website from command line https://lanedirt.com/2023/10/linux-display-ssl-cert-of-website-from-command-line/ https://lanedirt.com/2023/10/linux-display-ssl-cert-of-website-from-command-line/#respond Thu, 05 Oct 2023 09:33:53 +0000 https://lanedirt.tech/?p=666 If you want to display details of an SSL certificate that is returned by a website from the Linux commandline, you can use this command. 1. Install required packages In order to use the command below, the “openssl” package is required. You can install this package with this command: Or with yum: 2. Execute command-line… Continue reading Linux display SSL cert of website from command line

The post Linux display SSL cert of website from command line appeared first on Lanedirt.tech.

]]>
If you want to display details of an SSL certificate that is returned by a website from the Linux commandline, you can use this command.

1. Install required packages

In order to use the command below, the “openssl” package is required. You can install this package with this command:

sudo dnf install openssl

Or with yum:

sudo yum install openssl

2. Execute command-line command.

Execute the following statement in the Linux terminal.

echo | openssl s_client -showcerts -servername lanedirt.tech -connect lanedirt.etch:443 2>/dev/null | openssl x509 -inform pem -noout -text

Replace “lanedirt.tech” with the website you would like to see the SSL cert information for.

This command establishes a TLS connection to the target website on port 443 using OpenSSL’s s_client, specifically requesting the server’s SSL certificates. After fetching the certificates, the command then extracts the main certificate from the stream and uses openssl x509 to display its detailed information in a human-readable format. The 2>/dev/null part ensures that any error messages from the process are discarded and not shown in the output.

The command above returns output like this, which includes information about the certificate itself, common names, expiration dates etc.

[user@linux01 public_html]$ echo | openssl s_client -showcerts -servername lanedirt.tech -connect lanedirt.tech:443 2>/dev/null | openssl x509 -inform pem -noout -text
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            03:3c:7d:89:aa:ca:3b:08:21:a7:40:56:a1:9c:f7:cb:2b:5e
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, O = Let's Encrypt, CN = R3
        Validity
            Not Before: Sep 15 21:10:38 2023 GMT
            Not After : Dec 14 21:10:37 2023 GMT
        Subject: CN = lanedirt.tech
        Subject Public Key Info:
            Public Key Algorithm: id-ecPublicKey
                Public-Key: (256 bit)
                pub:
                    04:64:59:ac:66:39:5f:73:81:2d:67:6b:c5:be:a3:
                    31:57:9e:76:f7:25:87:1e:72:8a:17:6f:f1:90:88:
                    6f:20:63:78:45:2c:99:81:da:9c:e3:1a:ca:1d:71:
                    5d:1b:20:f6:32:b2:d1:72:e7:73:ef:1d:18:85:c6:
                    9c:87:97:b3:06
                ASN1 OID: prime256v1
                NIST CURVE: P-256
        X509v3 extensions:
            X509v3 Key Usage: critical
                Digital Signature
            X509v3 Extended Key Usage:
                TLS Web Server Authentication, TLS Web Client Authentication
            X509v3 Basic Constraints: critical
                CA:FALSE
            X509v3 Subject Key Identifier:
                E0:5E:AB:ED:41:AD:9B:E1:87:23:34:81:0E:1D:B5:70:F3:9F:F2:63
            X509v3 Authority Key Identifier:
                keyid:14:2E:B3:17:B7:58:56:CB:AE:50:09:40:E6:1F:AF:9D:8B:14:C2:C6

            Authority Information Access:
                OCSP - URI:http://r3.o.lencr.org
                CA Issuers - URI:http://r3.i.lencr.org/

            X509v3 Subject Alternative Name:
                DNS:lanedirt.tech, DNS:www.lanedirt.tech
            X509v3 Certificate Policies:
                Policy: 2.23.140.1.2.1

            CT Precertificate SCTs:
                Signed Certificate Timestamp:
                    Version   : v1 (0x0)
                    Log ID    : 7A:32:8C:54:D8:B7:2D:B6:20:EA:38:E0:52:1E:E9:84:
                                16:70:32:13:85:4D:3B:D2:2B:C1:3A:57:A3:52:EB:52
                    Timestamp : Sep 15 22:10:38.789 2023 GMT
                    Extensions: none
                    Signature : ecdsa-with-SHA256
                                30:44:02:20:38:78:FB:74:F5:EA:21:46:D6:62:86:22:
                                52:35:04:72:31:D8:91:59:30:2C:9A:8B:18:10:CA:1D:
                                05:68:73:F8:02:20:35:75:08:D1:04:44:BC:EB:E3:3C:
                                89:42:73:A8:A4:35:E7:8D:97:98:F5:C5:E0:3F:34:89:
                                10:05:93:33:17:C8
                Signed Certificate Timestamp:
                    Version   : v1 (0x0)
                    Log ID    : E8:3E:D0:DA:3E:F5:06:35:32:E7:57:28:BC:89:6B:C9:
                                03:D3:CB:D1:11:6B:EC:EB:69:E1:77:7D:6D:06:BD:6E
                    Timestamp : Sep 15 22:10:38.804 2023 GMT
                    Extensions: none
                    Signature : ecdsa-with-SHA256
                                30:45:02:21:00:BB:1D:D1:B2:A7:B7:BA:A5:31:C4:B7:
                                CB:6C:0B:8F:A1:90:BB:4E:CA:B2:E9:13:75:40:27:4D:
                                4B:14:B8:D3:F0:02:20:58:31:08:AA:9A:3C:3E:F7:F8:
                                11:04:6A:C3:CD:47:BC:3E:B7:35:0D:87:B6:D2:97:6D:
                                69:50:C4:94:F2:7B:03
    Signature Algorithm: sha256WithRSAEncryption
         82:0d:19:5b:38:90:ac:04:23:65:5a:53:38:87:f2:da:6d:95:
         77:43:ed:8e:8d:18:91:92:7c:55:5b:a9:db:9d:be:aa:ad:6b:
         6d:4f:d4:77:33:0e:aa:51:f4:e1:e2:77:9a:85:14:e6:6a:5e:
         27:ef:4a:34:c8:73:c8:7e:b4:93:23:32:f0:4e:8d:68:d1:f0:
         4e:f4:f5:39:5f:72:53:f9:17:0b:b8:c6:fe:56:3d:72:e0:88:
         66:65:47:35:f4:fe:2c:ff:dc:a0:3b:97:2c:01:30:1c:4a:1e:
         1f:6a:95:1b:c3:de:40:20:87:f6:25:c9:02:ba:50:0c:63:90:
         3f:86:5e:7b:e6:d6:53:bd:c4:1f:c9:db:26:e1:48:63:f8:f0:
         59:80:c7:5e:d7:de:a1:79:cf:6a:7a:29:ff:b2:ef:bd:b5:20:
         73:83:b1:c0:47:16:72:ac:19:d2:86:f5:36:ed:be:f2:8f:d5:
         d2:a2:a9:39:62:6b:01:ff:f7:67:d8:78:a3:17:fe:ff:00:b1:
         18:a5:b8:ee:78:b7:3a:fc:c5:f1:95:4b:49:07:dd:d1:ea:f4:
         64:e9:19:04:f2:f4:62:a0:17:0b:59:9e:bb:7a:27:df:ac:33:
         22:83:59:94:6a:34:fe:bb:0a:d2:72:ff:7f:e0:86:31:1f:42:
         e5:08:85:cb

The post Linux display SSL cert of website from command line appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2023/10/linux-display-ssl-cert-of-website-from-command-line/feed/ 0
Git how to fix error “failed to connect timeout” while HTTPS from browser works https://lanedirt.com/2023/04/git-how-to-fix-failed-to-connect-timeout-while-https-from-browser-works/ https://lanedirt.com/2023/04/git-how-to-fix-failed-to-connect-timeout-while-https-from-browser-works/#respond Thu, 06 Apr 2023 10:08:32 +0000 https://lanedirt.tech/?p=659 Are you running into issues when communicating through Git with a remote and the connection timing out, while accessing the Git server via HTTPS from your browser works? Read on. 1. Troubleshooting issue While doing a Git fetc/pull/push you might see the following error: First check if you are able to access your remote Git… Continue reading Git how to fix error “failed to connect timeout” while HTTPS from browser works

The post Git how to fix error “failed to connect timeout” while HTTPS from browser works appeared first on Lanedirt.tech.

]]>
Are you running into issues when communicating through Git with a remote and the connection timing out, while accessing the Git server via HTTPS from your browser works? Read on.

1. Troubleshooting issue

While doing a Git fetc/pull/push you might see the following error:

$ git pull
fatal: unable to access 'https://github.com/lanedirt/test.repo': Failed to connect to github.com port 443: Timed out

First check if you are able to access your remote Git host (e.g. GitHub) through your browser. If this doesn’t work, then you should check your internet and/or firewall settings. If this does work, move on to the next step.

2. Check proxy settings

If you are able to access the remote Git host through your browser but not through git via HTTPS, the issue might be associated with (corporate) proxy settings. This is especially the case when using Git on Windows hosts.

Check if you are using a corporate proxy in your environment. If so, you should try to configure this proxy URL in the Git global settings as well. Open up a new command prompt or Git Bash window, and type in the following commands:

$ git config --global http.proxy http://[host]:[port]
$ git config --global credential.helper wincred

Note: by setting the credential.helper to “wincred” we let Windows handle any authentication with the proxy for us, so we don’t have to hardcode a username or password into the URL.

Now, try to do a git fetch or push again. Probably, now it works:

$ git pull
Already up to date.

I hope this helped you!

The post Git how to fix error “failed to connect timeout” while HTTPS from browser works appeared first on Lanedirt.tech.

]]>
https://lanedirt.com/2023/04/git-how-to-fix-failed-to-connect-timeout-while-https-from-browser-works/feed/ 0