.Net Core 中的 AOP 原理

AOP是所有现代OOP语言开发框架中的基础功能,在各类软件开发框架中有着广泛应用。虽然AOP早已不是什么新技术,可知其然还要其所以然。本文将基于.NET环境探讨实现AOP的底层原理。 ...

2020年2月28日 · 12 分钟 · WS

Hyper-V NAT 网络设置固定 IP / DHCP

Hyper-V 默认的 Default Switch 同时支持了 NAT 网络以及 DHCP,虚拟机能够访问外网。 但使用过程中发现这个 IP 网段经常变化,而且 Hyper-V 没有提供管理其 NAT 网络与 DHCP 的图形化界面功能。 如果开发者需要同时管理多个 VM,且在局域网中无法为他们单独分配固定 IP 时,使用可自行配置的 NAT 网络显得尤为重要。 本文提供一种自定义管理 Hyper-V NAT 网络的方法,虚拟机能够通过固定 IP 连接至该网络,且能够访问外网。 ...

2019年6月12日 · 3 分钟 · WS

Git Server on Linux

Git 服务器搭建,如果无需权限控制,仅团队内部使用,初始化一个服务器仓库,其他人通过 ssh 访问这个文件夹即可。具体步骤如下: 添加 git-shell which git-shell vim /etc/shells # and add the path to git-shell from last command 添加 Git 用户 useradd git -m -s git-shell 初始化仓库 mkdir -p /opt/git/repo.git git init --bare /opt/git/repo.git chown -R git:git /opt/git 定制欢迎信息 git help shell vim /home/git/git-shell-commands/no-interactive-login --- #!/bin/sh printf '%s\n' "Hi $USER! You've successfully authenticated, but I do not" printf '%s\n' "provide interactive shell access." exit 128 验证配置结果 ssh -T git@ip --- Hi git! You've successfully authenticated, but I do not provide interactive shell access. Clone 仓库 git clone git@git-server:/opt/git/repo.git 参考:https://git-scm.com/book/zh/v2 - 服务器上的git

2019年2月19日 · 1 分钟 · WS

windows+linux 双启动 卸载linux,重建windows引导(UEFI)

以下内容操作具有风险,操作前请提前备份数据。建议由有丰富经验的人使用,需要掌握diskpart。 背景 使用ubuntu+win10 dual boot后,需要重置回纯净win10系统。 ...

2019年1月9日 · 4 分钟 · WS