目录

充电学习中...

标签: 备忘录 (3)

dotnetcore填坑汇总

1.NET Core使用System.Drawing.Common在Docker环境下报错的问题 在使用VS2019生成的Dockerfile文件进行docker部署.net core 2.2webapi项目时,运行项目报错,大概意思是"找不到库文件libdl",查阅资料发现是引用了ystem.Drawing.Common的原因。下面给出解决方法(解决方案来源): 首先需要让VS自动生成的dockerfile进行bulid时支持apt-get命令,在Dockerfile中加入以下命令 RUN sed -i 's/http:\/\/archive\.ubuntu\.com\/ubuntu\//http:\/\/mirrors\.163\.com\/ubuntu\//g' /etc/apt/sources.list 然后安装libc6-dev,在Dockerfile中加入以下命令 RUN apt-get update RUN apt-get install -y --no-install-recommends libgdiplus libc6-dev 最终dockerfile修改如下图......

.net core 发布docker时使用环境变量进行动态配置

.Net Core读取环境变量的方法 Environment.GetEnvironmentVariable("name") Docker 容器启动时加入环境变量参数 --env Title="value" Dockerfile中指定环境变量参数 WORKDIR /app ENV Title 1234 EXPOSE 80 两种加入环境变量的方式都可以

JsHook

JS标准内置对象 Object.defineProperty(document, 'cookie', { get: function() { console.log('getcookie'); debugger; return ""; }, set: function(value) { console.log('setcookie', value); debugger; return value; }, }); Everything-Hook 来源 // ==UserScript== // @name Everything-Hook // @namespace https://gitee.com/HGJing/everthing-hook/ // @updateURL https://gitee.com/HGJing/everthing-hook/raw/master/src/everything-hook.js // @version 0.5.9054 // @include * // @description it can hook everything // @author C.....