Skip to content

Instantly share code, notes, and snippets.

View codedeep79's full-sized avatar

Nguyễn Trung Hậu codedeep79

View GitHub Profile
@codedeep79
codedeep79 / The current Visual Studio version does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use Visual Studio version 17.8 or higher.md
Last active January 6, 2025 05:21
The current Visual Studio version does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use Visual Studio version 17.8 or higher

The error message NETSDK1209 indicates that your current version of Visual Studio does not support targeting .NET 8.0:

  • Update the .csproj file to target a supported version of .NET, such as .NET 7.0.
    • Open the .csproj file.

    • Find the <TargetFramework> element.

    • Change the value to net7.0 or a lower version.

      <TargetFramework>net7.0</TargetFramework>
#!/bin/bash
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
@codedeep79
codedeep79 / Lỗi: TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'.md
Last active June 29, 2024 08:05
Lỗi: TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'

Lỗi TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version' xảy ra khi truyền một tham số không hợp lệ (ssl_version) vào hàm kwargs_from_env() trong thư viện Docker Python.

image

Docker compose version 1 không hoạt động với Docker SDK for Python 7.0.0+ hiện có trên hệ thống, chỉ hoạt động đến version 6.x.y. Nên có 2 cách giải quyết vấn đề này:

  • Gỡ cài đặt thư viện Docker SDK 7.0.0+ trong hệ thống và cài lại phiên bản < 7.0.0:

    pip uninstall docker
    pip install docker==6.1.3
    
@codedeep79
codedeep79 / Lỗi: docker.errors.DockerException: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked.md
Last active June 29, 2024 07:38
Lỗi: docker.errors.DockerException: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked

Lỗi DockerException với thông báo Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked' thường xuất hiện khi có sự không tương thích giữa các phiên bản Docker library và Library HTTP mà Docker sử dụng.

image

Để khắc phục vấn đề này, có thể thử các bước sau:

  • Cập nhật Thư viện Docker: Đảm bảo rằng sử dụng phiên bản mới nhất của thư viện Docker Python. Có thể cập nhật nó bằng cách chạy: pip install --upgrade docker
  • Cập nhật Thư viện urllib3: Lỗi này có thể liên quan đến thư viện urllib3 mà thư viện Docker sử dụng để thực hiện các yêu cầu HTTP. Cập nhật urllib3 lên phiên bản mới nhất: pip install --upgrade urllib3
@codedeep79
codedeep79 / Viber Not Working on Ubuntu 24.04.md
Last active June 15, 2024 06:33
Viber Not Working on Ubuntu 24.04

This worked for me on Ubuntu 24.04:

  • Download libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb on Openssl 1.0

    sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb

  • Install Flatpak:

    sudo apt install flatpak
    

sudo apt install gnome-software-plugin-flatpak

@codedeep79
codedeep79 / Update text data in files according to specific versions of files with the same name in Minio.md
Created October 12, 2023 09:32
Update text data in files according to specific versions of files with the same name in Minio

To update text data in files according to specific versions of files with the same name in Minio using Python, you can use the Minio Python library to interact with your Minio server. The following steps outline the process:

  1. Install the Minio Python library:
pip install minio
  1. Import the necessary libraries and set up your Minio client:
@codedeep79
codedeep79 / Separate Excel Data into Workbooks by Column Values.md
Last active May 25, 2023 01:52
Separate Excel Data into Workbooks by Column Values

Example 1

from pathlib import Path

import pandas as pd  # pip install pandas

# Define & create output directory
output_dir = Path(__file__).parent / "output"
output_dir.mkdir(parents=True, exist_ok=True)
@codedeep79
codedeep79 / Viber No Connection on Ubuntu 22.04 even I have an internet.md
Created February 18, 2023 06:57
Viber No Connection on Ubuntu 22.04 even I have an internet
wget https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb
sudo apt install ./viber.deb
rm -rf viber.deb
@codedeep79
codedeep79 / The following packages have unmet dependencies: curl : Depends: libcurl4 (= 7.85.0-1ubuntu0.1) but 7.85.0-1ubuntu0.2 is to be installed E: Unable to correct problems, you have held broken packages.md
Created January 25, 2023 06:48
Lỗi: The following packages have unmet dependencies: curl : Depends: libcurl4 (= 7.85.0-1ubuntu0.1) but 7.85.0-1ubuntu0.2 is to be installed E: Unable to correct problems, you have held broken packages.

Step 1: Enable focal-updates, run: echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list

Once done, run sudo apt update and retry installing cURL.

Step 2: Install libcurl4 from focal, simply run: sudo apt install libcurl4=7.85.0-1ubuntu0.1

@codedeep79
codedeep79 / README.md
Created January 23, 2023 08:58
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)

This may happen if:

  • 'Synaptic Package Manager' or 'Software Updater' is open.
  • Some apt command is running in Terminal.
  • Some apt process is running in background.

For above wait for the process to complete. If this does not happen run in terminal:

sudo killall apt apt-get