update
This commit is contained in:
parent
bc0cf47785
commit
f64a97ecb0
10
linux/aptcacheng.md
Normal file
10
linux/aptcacheng.md
Normal file
@ -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
|
||||
```
|
||||
14
linux/check_sys.md
Normal file
14
linux/check_sys.md
Normal file
@ -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 | 查看目录大小 |
|
||||
| | |
|
||||
|
||||
35
linux/create_ap.md
Normal file
35
linux/create_ap.md
Normal file
@ -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"
|
||||
```
|
||||
13
linux/date.sh
Normal file
13
linux/date.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# date.sh
|
||||
# Copyright (C) 2023 veypi <i@veypi.com>
|
||||
#
|
||||
# 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)) )
|
||||
4
linux/lazygit.md
Normal file
4
linux/lazygit.md
Normal file
@ -0,0 +1,4 @@
|
||||
# lazy git 使用
|
||||
|
||||
https://github.com/jesseduffield/lazygit
|
||||
|
||||
15
linux/lvm.md
Normal file
15
linux/lvm.md
Normal file
@ -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
|
||||
|
||||
```
|
||||
43
linux/nvidia_driver.md
Normal file
43
linux/nvidia_driver.md
Normal file
@ -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
|
||||
|
||||
|
||||
```
|
||||
20
linux/passthrough_4090.md
Normal file
20
linux/passthrough_4090.md
Normal file
@ -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
|
||||
|
||||
```
|
||||
@ -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
|
||||
```
|
||||
|
||||
14
mac/latex.md
Normal file
14
mac/latex.md
Normal file
@ -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
|
||||
```
|
||||
46
mac/phpmyadmin.md
Normal file
46
mac/phpmyadmin.md
Normal file
@ -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进行签名
|
||||
|
||||
钥匙串访问->证书助理->创建证书颁发机构
|
||||
|
||||

|
||||
|
||||
返回钥匙串访问的证书列表,信任此证书
|
||||
|
||||

|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
10
nats/nats.md
Normal file
10
nats/nats.md
Normal file
@ -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
|
||||
```
|
||||
@ -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
|
||||
```
|
||||
|
||||
104
test.html
Normal file
104
test.html
Normal file
@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Veypi's Personal Page</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f4f4;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
nav a {
|
||||
color: #fff;
|
||||
padding: 14px 20px;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
section {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
h2 {
|
||||
border-bottom: 2px solid #333;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1>Veypi's Personal Page</h1>
|
||||
</header>
|
||||
<nav>
|
||||
<a href="#resume">Resume</a>
|
||||
<a href="#projects">Projects</a>
|
||||
<a href="#blog">Blog</a>
|
||||
</nav>
|
||||
<section id="resume">
|
||||
<div class="container">
|
||||
<h2>Resume</h2>
|
||||
<p>Here you can add your professional experience, education background, skills, and any other relevant
|
||||
information.</p>
|
||||
<!-- Add your resume content here -->
|
||||
</div>
|
||||
</section>
|
||||
<section id="projects">
|
||||
<div class="container">
|
||||
<h2>Projects</h2>
|
||||
<p>Here you can showcase your projects with descriptions, links, and images if available.</p>
|
||||
<!-- Add your project content here -->
|
||||
</div>
|
||||
</section>
|
||||
<section id="blog">
|
||||
<div class="container">
|
||||
<h2>Blog</h2>
|
||||
<p>Here you can write and share your blog posts.</p>
|
||||
<!-- Add your blog content here -->
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer">
|
||||
<p>© 2024 Veypi. All rights reserved.</p>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
7
vue/chrome_debug.md
Normal file
7
vue/chrome_debug.md
Normal file
@ -0,0 +1,7 @@
|
||||
# chrome 调试方法
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
在控制台源代码页 暂停程序, 可以查看函数调用堆栈
|
||||
Loading…
x
Reference in New Issue
Block a user