diff --git a/README.md b/README.md index 858ca22..3b49b94 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,6 @@ $$ \end{matrix} $$ -[ - -^]:123 - diff --git a/linux/aptcacheng.md b/linux/aptcacheng.md new file mode 100644 index 0000000..dc7e9ef --- /dev/null +++ b/linux/aptcacheng.md @@ -0,0 +1,10 @@ +# apt cache mirror + +```bash +apt-get install apt-cacher-ng +systemctl enable apt-cacher-ng +service apt-cacher-ng start + + +#/etc/apt-cacher-ng/acng.conf +``` diff --git a/linux/check_sys.md b/linux/check_sys.md new file mode 100644 index 0000000..3abd21e --- /dev/null +++ b/linux/check_sys.md @@ -0,0 +1,14 @@ +# linux 检查 系统资源 + +| 命令 | 含义 | +| :------------------: | :----------: | +| uname -a | 查看内核 | +| head -n 1 /etc/issue | 查看操作系统 | +| cat /proc/cpuinfo | 查看cpu | +| lscpu | 查看cpu | +| | | +| free -m | 查看mem | +| df -h | 查看分区使用 | +| du -h | 查看目录大小 | +| | | + diff --git a/linux/create_ap.md b/linux/create_ap.md new file mode 100644 index 0000000..738f183 --- /dev/null +++ b/linux/create_ap.md @@ -0,0 +1,35 @@ +# create ap + +### ubuntu netplan + +```bash +sudo apt install hostapd +sudo systemctl unmask hostapd +sudo systemctl enable hostapd +sudo vim /etc/hostapd/hostapd.conf + +``` +```yaml +interface=wlan0 +driver=nl80211 +hw_mode=g +channel=1 +ieee80211d=1 +country_code=DE +ieee80211n=1 +wmm_enabled=1 +macaddr_acl=0 +auth_algs=1 +ignore_broadcast_ssid=0 +wpa=2 +wpa_key_mgmt=WPA-PSK +rsn_pairwise=CCMP +ssid=yourSSID +wpa_passphrase=yourpassphrase +``` + +```bash +sudo vim /etc/default/hostapd + +# DAEMON_CONF="/etc/hostapd/hostapd.conf" +``` diff --git a/linux/date.sh b/linux/date.sh new file mode 100644 index 0000000..468f6e0 --- /dev/null +++ b/linux/date.sh @@ -0,0 +1,13 @@ +#! /bin/sh +# +# date.sh +# Copyright (C) 2023 veypi +# +# Distributed under terms of the MIT license. +# + + +sudo date -s "$(bash ~/.date.sh 01)" +a=$RANDOM +a1=$1 +echo $(printf "202310${a1}T%02d:%02d:%02d" $(($RANDOM%24)) $(($RANDOM%24)) $(($RANDOM%24)) ) diff --git a/linux/lazygit.md b/linux/lazygit.md new file mode 100644 index 0000000..637c068 --- /dev/null +++ b/linux/lazygit.md @@ -0,0 +1,4 @@ +# lazy git 使用 + +https://github.com/jesseduffield/lazygit + diff --git a/linux/lvm.md b/linux/lvm.md new file mode 100644 index 0000000..74cc539 --- /dev/null +++ b/linux/lvm.md @@ -0,0 +1,15 @@ +# lvm + + +## lvm 扩容 + +```bash + + +sudo lvdisplay +sudo pvdisplay +sudo lvextend -L +1.5TB /dev/ubuntu-vg/ubuntu-lv +sudo resize2fs /dev/ubuntu-vg/ubuntu-lv +df -h + +``` diff --git a/linux/nvidia_driver.md b/linux/nvidia_driver.md new file mode 100644 index 0000000..e9163b8 --- /dev/null +++ b/linux/nvidia_driver.md @@ -0,0 +1,43 @@ +# ubuntu22 install 4090 dirver + + +## ubuntu server + +```bash + +sudo apt install nvidia-driver-550-server nvidia-utils-550-server +reboot +nvidia-smi + +``` + +```bash + +sudo apt install pkg-config libglvnd-dev gcc-12 make +sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 +sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 +sudo systemctl set-default multi-user.target +sudo reboot -h now +sudo ./NVIDIA-Linux-x86_64-535.171.04.run +sudo systemctl set-default graphical.target +sudo reboot -h now +``` + +## cuda + +https://developer.nvidia.com/cuda-toolkit-archive + +https://developer.nvidia.com/cuda-12-1-1-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local + +```bash + +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin +sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 +wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb +sudo dpkg -i cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb +sudo cp /var/cuda-repo-ubuntu2204-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ +sudo apt update +sudo apt -y install cuda + + +``` diff --git a/linux/passthrough_4090.md b/linux/passthrough_4090.md new file mode 100644 index 0000000..5976f1c --- /dev/null +++ b/linux/passthrough_4090.md @@ -0,0 +1,20 @@ +# 4090直通 + +```bash +lspci -nn | grep NVIDIA + +10de:2684,10de:22ba + +echo "vfio vfio_iommu_type1 vfio_virqfd vfio_pci ids=10de:2684,10de:22ba" >> /etc/initramfs-tools/modules +echo "options vfio-pci ids=10de:2684,10de:22ba" > /etc/modprobe.d/vfio.conf + +echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf +echo "blacklist nouveau" > /etc/modprobe.d/blacklist-nvidia.conf +echo "blacklist nvidiafb" >> /etc/modprobe.d/blacklist-nvidia.conf +sed -ri "/^GRUB_CMDLINE_LINUX_DEFAULT=/ s/\"$/ intel_iommu=on vfio-pci.ids=10de:2684,10de:22ba\"/" /etc/default/grub + +update-initramfs -u +update-grub +reboot -h now + +``` diff --git a/linux/zsh.md b/linux/zsh.md index 17cb197..3293042 100644 --- a/linux/zsh.md +++ b/linux/zsh.md @@ -3,6 +3,7 @@ ``` bash sudo apt install -y zsh sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://public.veypi.com/install_zsh.sh)" echo 'PROMPT=%m\ $PROMPT' >> ~/.zshrc @@ -11,4 +12,9 @@ sed -i '1i\DISABLE_AUTO_UPDATE="true"' ~/.zshrc chsh -s /bin/zsh sudo reboot -h now + + +git clone https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git +cd ohmyzsh/tools +REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git sh install.sh ``` diff --git a/mac/latex.md b/mac/latex.md new file mode 100644 index 0000000..4d0d5be --- /dev/null +++ b/mac/latex.md @@ -0,0 +1,14 @@ +# mac latex zathura nvim + + +### mactex + + +### [zathura](https://github.com/zegervdv/homebrew-zathura) +```bash +brew tap zegervdv/zathura +brew install zathura +brew install zathura-pdf-poppler +mkdir -p $(brew --prefix zathura)/lib/zathura +ln -s $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib $(brew --prefix zathura)/lib/zathura/libpdf-poppler.dylib +``` diff --git a/mac/phpmyadmin.md b/mac/phpmyadmin.md new file mode 100644 index 0000000..f816f5c --- /dev/null +++ b/mac/phpmyadmin.md @@ -0,0 +1,46 @@ +# mac 安装phpmyadmin + +https://www.simplified.guide/macos/apache-php-homebrew-codesign + +从macos12后已经默认不安装php + +```bash +brew install php@7.4 +# 添加环境变量 +echo 'export PATH="/usr/local/opt/php@7.4/bin:$PATH"' >> ~/.zshrc +echo 'export PATH="/usr/local/opt/php@7.4/sbin:$PATH"' >> ~/.zshrc +# 查看php版本 +php -v +``` + +对phpmodul进行签名 + +钥匙串访问->证书助理->创建证书颁发机构 + +![image-20220718015633872](https://public.veypi.com/img/screenshot/20220718015812.png) + +返回钥匙串访问的证书列表,信任此证书 + +![image-20220718020005930](https://public.veypi.com/img/screenshot/20220718020012.png) + +```bash +# 执行签名 +codesign --sign "php_ca_1" --force --keychain ~/Library/Keychains/login.keychain-db /usr/local/opt/php@7.4/lib/httpd/modules/libphp7.so +codesign --sign "php_ca_1" --force --keychain ~/Library/Keychains/login.keychain-db /usr/local/opt/php@7.4/lib/php/20190902/opcache.so + +``` + + + +修改apache2 配置文件 + +```bash +sudo vim /etc/apache2/other/php7.conf +# 添加 +LoadModule rewrite_module libexec/apache2/mod_rewrite.so +LoadModule php7_module /usr/local/opt/php@7.4/lib/httpd/modules/libphp7.so "phpca" + +# 重启 +sudo apachectl -k restart +``` + diff --git a/nats/nats.md b/nats/nats.md new file mode 100644 index 0000000..a72bf76 --- /dev/null +++ b/nats/nats.md @@ -0,0 +1,10 @@ +# nats + +## install + +```bash + +go install github.com/nats-io/nats-server/v2@latest + +go install github.com/nats-io/natscli/nats@latest +``` diff --git a/nodejs/install.md b/nodejs/install.md index 1bf2643..c282375 100644 --- a/nodejs/install.md +++ b/nodejs/install.md @@ -50,4 +50,6 @@ sudo n stable https://github.com/nvm-sh/nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash +nvm install 20 +npm install --global yarn ``` diff --git a/test.html b/test.html new file mode 100644 index 0000000..85ff7b6 --- /dev/null +++ b/test.html @@ -0,0 +1,104 @@ + + + + + + + Veypi's Personal Page + + + + +
+

Veypi's Personal Page

+
+ +
+
+

Resume

+

Here you can add your professional experience, education background, skills, and any other relevant + information.

+ +
+
+
+
+

Projects

+

Here you can showcase your projects with descriptions, links, and images if available.

+ +
+
+
+
+

Blog

+

Here you can write and share your blog posts.

+ +
+
+ + + + diff --git a/vue/chrome_debug.md b/vue/chrome_debug.md new file mode 100644 index 0000000..ce64cc4 --- /dev/null +++ b/vue/chrome_debug.md @@ -0,0 +1,7 @@ +# chrome 调试方法 + +![image-20220925150013418](https://public.veypi.com/img/screenshot/20220925150020.png) + + + +在控制台源代码页 暂停程序, 可以查看函数调用堆栈