Skip to content

Instantly share code, notes, and snippets.

@MarshalW
MarshalW / key-gen.md
Last active April 8, 2024 06:56
有关ssh key及其他token生成的命令

有关ssh key及其他token生成的命令

ssh-keygen 静默生成 ssh key

不需要输入passphrase。

默认~/.ssh/id_rsa:

ssh-keygen -t rsa -b 4096 -q -P '' <<< ""$'\n'"y" 2>&1 >/dev/null
@MarshalW
MarshalW / privoxy-whitelist-forward-socks5.md
Last active March 27, 2024 07:37
privoxy设置转发socks5 proxy白名单

privoxy设置转发socks5 proxy白名单

以下步骤可在ubuntu/raspbian下执行

安装配置socks5 proxy

需要有一个可ssh访问境外节点账号。

需要创建本地账号的密钥(如果没有~/.ssh/id_rsa):

@MarshalW
MarshalW / vscode-extends.md
Last active February 20, 2024 12:05
安装 vscode extends

安装 vscode extends

查看已经安装的extends:

code --list-extensions | xargs -L 1 echo code --install-extension

安装常用的extends:

@MarshalW
MarshalW / ubuntu-dev-install-config.md
Last active December 14, 2023 02:08
ubuntu desktop 开发环境安装配置

ubuntu 开发环境安装配置

ubuntu 版本:

  • 20.04.1 desktop,国内下载 清华镜像 - ubuntu release
  • macOS 下使用 vmware fusion,免费的,使用界面比 virtualbox 方便很多

需要安装和配置的项目:

  • ansible
@MarshalW
MarshalW / abuout-git-lfs.md
Last active December 8, 2023 07:18
git lfs 安装和配置

git lfs 使用

# 安装
sudo apt-get install git-lfs -y

# 使用
git lfs install

# 和普通 git 一样使用
@MarshalW
MarshalW / stable-diffusion-gtx1650-error.md
Last active December 5, 2023 11:25
stable diffusion 使用 gtx1650 的问题

stable diffusion 使用 gtx1650 的问题

正常的代码:

from diffusers import DiffusionPipeline
import torch

# runwayml/stable-diffusion-v1-5
model_path="/models/stable-diffusion-v1-5"
@MarshalW
MarshalW / ansible-get-cidr-network.md
Last active November 28, 2023 09:09
Ansible 脚本获取 ip 地址的 CIDR 网络表示

Ansible 脚本获取 ip 地址的 CIDR 网络表示

网络地址

形式类似 10.10.100.0/24

- hosts: "{{ host }}"
  gather_facts: false
  tasks: