共有 261 篇文章
Hugo Install
2022-07-17 - 2024-09-18
GitHub https://github.com/gohugoio/hugo.git Build 使用官方编译版本 使用源码编译 http://pi.akvicor.com:7021/?p=199 wget http://pi.akvicor.com:7021/file?f=1233 -O hugo_build.tgz tar -zxvf hugo_build.tgz cd hugo ./build.sh Install mv gopath/bin/hugo /usr/bin/hugo hugo version Usage # 版本和环境详细信息 hugo env # 创建新站点 hugo new site siteName # 创建文章 hugo new index.md # 编译生成静态文件并输出到pu
搜索功能
2022-07-14 - 2024-09-18
为hugo添加搜索功能,在content下创建search.html页面,添加以下内容 +++ title = "Search" description = "Akvico's Blog" date = "2022-07-14" author = "Akvicor" +++ <style> /* 手机适配 */ @media screen and (max-width: 500px) { .search{ padding-right: 25px; } .search input{ width: 100%; }
Abbr
2022-07-14 - 2024-09-18
编写 编写abbr.html放在layouts/shortcodes/文件夹中 <!– layouts/shortcodes/abbr.html –> <abbr title="{{ .Get "title" }}">{{ .Get "text" }}</abbr> 使用 {{< abbr title="Ocean University of China" text="OUC" >}} OUC
Shortcodes
2022-07-14 - 2024-09-18
为防止 shortcodes 语法被博客生产 短代码, 加 * 使用 {{</* myshortcode */>}}
Golang Install
2022-07-14 - 2024-09-18
选择要下载的版本 https://go.dev/dl/ 下载安装 # 下载 wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz # 解压 mv go1.18.4.linux-amd64.tar.gz go.tar.gz tar -C /usr/local -xzf go.tar.gz 配置环境变量 # 编辑.bashrc vim /root/.bashrc # 添加如下内容 export GOPATH=/root/go export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin # 设置代理 # Set the GOPROXY environment variable export GOPROXY=https://goproxy.io,direct # Set environment variable allow bypassing the proxy for
Debian APT源
2022-07-14 - 2024-09-18
编辑 apt install apt-transport-https ca-certificates vim /etc/apt/sources.list Debian 11 # Official & Contrib & Non-free deb https://deb.debian.org/debian bullseye main contrib non-free deb-src https://deb.debian.org/debian bullseye main contrib non-free deb https://deb.debian.org/debian-security bullseye-security main contrib non-free deb-src https://deb.debian.org/debian-security bullseye-security main contrib non-free deb https://deb.debian.org/debian bullseye-updates main contrib non-free deb-src https://deb.debian.org/debian bullseye-updates main contrib non-free # Backports deb https://deb.debian.org/debian bullseye-backports main contrib non-free deb-src https://deb.debian.org/debian bullseye-backports main contrib non-free Debian 12 # apt install apt-transport-https ca-certificates deb https://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware
开启SSH服务
2022-07-14 - 2024-09-18
安装SSH服务 apt-get install openssh-server 修改SSH配置文件 vim /etc/ssh/sshd_config 配置项 # 监听端口 Port 22 # 监听地址 ListenAddress 0.0.0.0 # 是否允许root用户登录 PermitRootLogin yes # 允许密码认证 PasswordAuthentication yes # 允许密钥认证 PubkeyAuthentication yes # 客户端保活 ClientAliveInterval 60 ClientAliveCountMax
LaTeX
2021-07-14 - 2024-09-18
如果要启用Mathjax和KaTeX 在header模板中添加以下内容 <!– Mathjax support –> {{ with .Site.Params.mathjax }} <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> <!– inline Mathjax –> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [['$math_inline$','$math_inline$'], ['\(','\)']], displayMath: [['$math_noinline$','$math_noinline$'], ['[',']']], processEscapes: true, processEnvironments: true, skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'], TeX: { equationNumbers: { autoNumber: "AMS" }, extensions: ["AMSmath.js",
Arch Linux Installation
2020-02-14 - 2024-09-15
Download ISO file https://www.archlinux.org/download/ https://mirrors.tuna.tsinghua.edu.cn/archlinux/iso/ Prepare an installation medium dd bs=4M if=path/to/archlinux.iso of=/dev/sdb status=progress oflag=sync Boot the live environment Connect Network iwctl device list station [device] scan station [device] get-networks station [device] connect SSID # Check ip address # Update the system clock timedatectl set-ntp true timedatectl status Partition the disks lsblk -l cgdisk /dev/sda # Format # EFI ef00 # Linux 8300 # SWAP 8200 mkfs.ext4 mkfs.vfat mkswap # Mount mount /dev/sda3 /mnt mkdir /mnt/boot mount /dev/sda1 /mnt/boot swapon /dev/sda2 Edit Mirrorlist vim /etc/pacman.
堆排序
2020-01-23 - 2024-09-15
  • 排序算法
  • 不稳定排序
  •     $math_inline$O(n\log(n))$math_inline$
    
通过proxychain在命令行实现魔法
2020-01-22 - 2024-09-18
在魔法环境下运行命令行命令,例如 apt-get wget git curl