Fix grub2 boot UEFI after Ubuntu dual system reinstall Windows

If you have installed Ubuntu and Windows dual system, then reinstall Windows system. Then the Grub boot item will most likely be overwritten by Windows Boot Manager, and you will not be able to enter Ubuntu at this time. But don't panic, follow the steps below to fix grub2 booting without installing additional software. Making Ubuntu's U Disk Boot Disk In order to repair the boot entry, we need to use the software tools provided by the Ubuntu system. Although we are temporarily unable to access the original Ubuntu system, we can use the image written on the Ubuntu USB stick to get a working basic Ubuntu environment. Download the mirror file h… Read more

Solve the problem of timeout and slowness of yarn installation of packages such as electron and chromedriver

Using yarn to install electron and chromedriver in China is often the problem of inability to connect. At this time, rather than setting up a proxy, we may prefer to use a domestic mirror repository to speed up the process. And when installing electron, it is useless to just set the global proxy of yarn. So how to set the proxy according to different packages? You can set it up by following the sample commands provided in the list below. Yarn global settings Set the repository address that yarn uses when installing general packages. yarn config set registry https://r.npm.taobao.org Register the module mirror ya … Read more

oh my zsh configuration tutorial under Ubuntu

oh my zsh is a very useful zsh-based configuration framework that simplifies many daily operations for Linux terminal users. Moreover, its interface is very good-looking compared to the original bash. This article is used to introduce how to install and configure oh my zsh and its common plugins under Ubuntu. oh my zsh installation and basic configuration Before installing oh my zsh, you need to execute the following commands to install the following git, curl, and zsh. % sudo apt install git curl zsh After installing the dependent projects, directly execute the following command to install with one click: % sh -c “$(curl -fsSL htt … Read more

Use space-vim-dark to configure and beautify the vim editor with one click

I have always used some mature configuration files to help me configure and beautify the vim editor. However, the spf13-vim.sh I originally used has not been updated for a long time, and some plug-ins in its plug-in list can no longer be downloaded normally. So I wanted to look for an alternative to it and finally found that space-vim-dark is not bad. Basic introduction of space-vim-dark After my search, I found a more useful and beautiful configuration file space-vim-dark. This space-vim-dark may be a vim configuration file written by Chinese people, which can make vim adapt to dark mode very well. First post the warehouse address: https://github.com/liu… Read more

Implementation of Hybrid Simulated Annealing Algorithm for Solving 3D Binning Problem in MATLAB

Due to the need to solve a three-dimensional binning problem in mathematical modeling, I selected the paper "Hybrid Simulated Annealing Algorithm for Solving Three-dimensional Binning Problems" published by Professor Zhang Defu and others in the Chinese Journal of Computers as the theory for solving the problem. Base. The abstract of the paper is as follows: A hybrid simulated annealing algorithm for efficiently solving the Three Dimensional Container Loading Problem (3D-CLP) is proposed. The three-dimensional bin loading problem requires loading a subset of a given set of boxes into a container such that The total volume of the loaded boxes is the largest. The hybrid simulated annealing algorithm introduced in this paper is based on three important algorithms: (1) the composite block generation algorithm, … Read more

Write .gitignore easily and quickly

If you build a Git repository, .gitignore is an option you need to consider. If you want to apply the template, it is recommended to use the template provided in the following warehouse address: Enter the warehouse address: https://github.com/github/gitignore The coverage of various templates is relatively complete, and can be used in combination according to your specific needs.

Correctly set permissions for SSH related configuration files

If you import external SSH public and private keys, you may need to create a .ssh folder in your home directory and move the public and private keys to this folder. However, if the permission problem is not configured correctly, it will cause the problem that the key cannot be used. Here is a set of commands to set the permissions of the configuration folder and public and private keys: % chmod 700 ~/.ssh % chmod 600 ~/.ssh/id_rsa % chmod 600 ~/.ssh/id_rsa.pub % chmod 600 ~/.ssh/authroized_keys

Add proxy settings for MacOS terminal

MacOS now uses Zsh by default, so look for the .zshrc configuration file in the user's home directory, and create it yourself if not. Edit. ~/.zshrc done. If you need to use a proxy, enter the proxy command in advance. If you need to unproxy, enter the unproxy command. or… Read more

HyperV Ubuntu virtual machine open enhanced session adjust resolution enable clipboard

Enhanced sessions are enabled by default on Windows-based virtual machines under HyperV. In the enhanced session, the clipboard and files can be easily shared with the host computer, and the resolution can be easily adjusted when the enhanced session is opened. In Linux systems such as Ubuntu, the default is a basic session, and the resolution adjustment needs to modify the boot file, and the clipboard and the host are independent, which is very inconvenient. After searching, I found a method to open an enhanced session under Ubuntu 20.04. It is effective after using it, so I record it here. If you need to open the enhanced session first, you must first enable the second-generation virtual machine option when creating the virtual machine, and turn off Secure Boot when it is first started. Remember to install Ubuntu... Read more

Solve the problems of oh-my-zsh plugin 'zsh-autosuggestions' not found and plugin 'zsh-syntax-highlighting' not found

When installing the zsh plugin zsh-autosuggestions or zsh-syntax-highlighting, we usually encounter the problem of oh-my-zsh plugin 'xxx' not found. Now, we analyze and solve the problems of oh-my-zsh plugin 'zsh-autosuggestions' not found and plugin 'zsh-syntax-highlighting' not found. The problem arises because the plugin is not... Read more

zh_CNZH-CN