Skip to content

Instantly share code, notes, and snippets.

View icepie's full-sized avatar
🔮
~

Tea icepie

🔮
~
View GitHub Profile

Upate

sudo pacman -Syy
sudo pacman-mirrors -i -c China -m rank

edit /etc/pacman.conf add this

[archlinuxcn]
SigLevel= TrustedOnly
@icepie
icepie / mint20-snap.md
Last active August 18, 2020 23:04
Snap in Linux mint 20

Snap is available for Linux Mint 18.2 (Sonya), Linux Mint 18.3 (Sylvia), Linux Mint 19 (Tara), Linux Mint 19.1 (Tessa) and the latest release, Linux Mint 20 (Ulyana).

You can find out which version of Linux Mint you’re running by opening System info from the Preferences menu.

Mint info

On Linux Mint 20, /etc/apt/preferences.d/nosnap.pref needs to be removed before Snap can be installed. This can be accomplished from the command line:

$ sudo rm /etc/apt/preferences.d/nosnap.pref
$ sudo apt update
@icepie
icepie / apt-fix.py
Created July 8, 2020 08:33
dpkg: 警告: 无法找到软件包 xxx 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
def main():
fix = open('fix.sh', 'w+')
for line in open("txt"):
pkg = re.match(re.compile('''dpkg: 警告: 无法找到软件包 (.+) '''), line)
if pkg:
cmd = "sudo apt-get -y install --reinstall " + pkg.group(1)
fix.write(cmd + '\n')
@icepie
icepie / ntfs
Created June 28, 2020 12:16
fix linux ntfs disk is read only
$ sudo fdisk -l
$ sudo ntfsfix /dev/sda2
@icepie
icepie / grub
Created June 28, 2020 06:21
fix touchpad not working for old desktop in ubuntu(linux mint)
# add the i8042.reset
GRUB_CMDLINE_LINUX_DEFAULT="i8042.reset quiet splash"
@icepie
icepie / cto10.sh
Created June 27, 2020 19:57
change gcc version
# when u installed the gcc-10 and g++-10 then run it
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 70 --slave /usr/bin/g++ g++ /usr/bin/g++-10
@icepie
icepie / synchronization.sh
Created June 26, 2020 06:18
[GUIDE] How to open Synchronization of NVIDIA in Linux
#!/bin/bash
sudo su
echo 'options nvidia_drm modeset=1' >> /lib/modprobe.d/nvidia-graphics-drivers.conf