Skip to main content

· 2 min read
Lejen

This will save up a lot of your time trying to fix SSL Error, certification problem

  1. Go to your dir to check if key exist C:\Users\username.ssh
cd %userprofile%\.ssh`
  1. Use putty to gen a key and convert openssh
  2. Open putty key generator, under key menu select generate key pair
  3. Move your mouse to generate randomness
  4. Put in your password, save your private key and public key
  5. Copy pub key to Bitbucket / GitHub personal acc
  6. Go to your profile > ssh keys
  7. Copy from putty and paste there
  8. Open git bash, right click on directory - select git bash) into place you wanna clone
  9. Activate ssh agent and add your key to ssh agent, and type your ssh key password
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa

Turn on the credential helper so that Git will save your password

  1. By default, Git will cache your password for 15 minutes.
  2. In Terminal, enter the following:
# Set git to use the credential memory cache
git config --global credential.helper cache

Common Error

FATAL ERROR: No supported authentication methods available (server sent: publickey)

  1. Open Pageant add private key

· 2 min read
Lejen
  1. Get rid of packages that are no longer required. If you read the apt-get commands guide, you might have come across the apt-get command option autoremove.

This option removes libs and packages that were installed automatically to satisfy the dependencies of an installed package. If that package is removed, these automatically installed packages are useless in the system.

It also removes old Linux kernels that were installed from automatically in the system upgrade.

It’s a no-brainer command that you can run from time to time to make some free space on your Ubuntu system:

sudo apt-get autoremove
  1. You can remove a program in Ubuntu from the software centre or using the command below with particular app name:

sudo apt-get remove package-name1 package-name2

  1. Clean up APT cache in Ubuntu Ubuntu uses APT (Advanced Package Tool) for installing, removing and managing software on the system, and in doing so it keeps a cache of previously downloaded and installed packages even after they’ve been uninstalled.

You can see the size of this cache with the du command below:

sudo du -sh /var/cache/apt 

Either remove only the outdated packages, like those superseded by a recent update, making them completely unnecessary.

sudo apt-get autoclean

Or delete apt cache in its entirety (frees more disk space):

sudo apt-get clean

· 2 min read
Lejen

You could install Visual Studio Code using apt:

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt update
sudo apt install code

or snap:

sudo snap install code --classic

After the C# package installing, the next dialog box appears: Clicking the marked button opens the next page, which provides the instructions for .Net Core SDK installation (along with ASP.Net Core runtime and .Net Core runtime installation instructions):

wget https://packages.microsoft.com/config/ubuntu/19.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo apt install ./packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-3.1

monodevelop IDE seems is not an option now, because of I could not find it. But if you want to install the current mono version (For example, on 20.04, amd64 architecture) you could use official mono repository:

sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [arch=amd64] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel

You could also install additional mono packages, which you could find by:

apt-cache search mono

The man mono will introduce you to its usage:

DESCRIPTION
mono is a runtime implementation of the ECMA Common Lan‐
guage Infrastructure. This can be used to run ECMA and
.NET applications.

· One min read
Lejen
  1. Let’s start by installing the python3-venv package that provides the venv module.
sudo apt install python3-venv
  1. Once the module is installed we are ready to create virtual environments for Python 3.
  2. Switch to the directory where you would like to store your Python 3 virtual environments.
cd /path/to/your/project
  1. Within the directory run the following command to create your new virtual environment.
python3 -m venv venv
  1. The command above creates a directory called venv, which contains a copy of the Python binary, the Pip package manager, the standard Python library and other supporting files.
  2. To start using this virtual environment, you need to activate it by running the activate script.
source venv/bin/activate