-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
6 lines (6 loc) · 14.6 KB
/
index.html
1
2
3
4
5
6
<!DOCTYPE html><html lang="zh-CN"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><meta name="description" content=""><title>老骥伏枥 | 路虽远,行则将至;事虽难,做则可成。</title><link rel="stylesheet" type="text/css" href="/css/style.css?v=0.0.0"><link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/normalize.css/normalize.min.css"><link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/purecss/build/pure-min.min.css"><link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/purecss/build/grids-responsive-min.css"><link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/css/font-awesome.min.css"><script type="text/javascript" src="//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script><link rel="icon" mask="" sizes="any" href="/favicon.ico"><link rel="Shortcut Icon" type="image/x-icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon.png"><link rel="alternate" type="application/atom+xml" href="/atom.xml"><script type="text/javascript" src="//cdn.jsdelivr.net/npm/clipboard/dist/clipboard.min.js"></script><script type="text/javascript" src="//cdn.jsdelivr.net/gh/codeseven/toastr/build/toastr.min.js"></script><link rel="stylesheet" href="//cdn.jsdelivr.net/gh/codeseven/toastr/build/toastr.min.css"><meta name="generator" content="Hexo 4.2.0"></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">老骥伏枥</h1><a id="logo" href="/.">老骥伏枥</a><p class="description">路虽远,行则将至;事虽难,做则可成。</p></div><div id="nav-menu"><a class="current" href="/."><i class="fa fa-home"> 首页</i></a><a href="/archives/"><i class="fa fa-archive"> 归档</i></a><a href="/about/"><i class="fa fa-user"> 关于</i></a><a href="/atom.xml"><i class="fa fa-rss"> 订阅</i></a></div></div><div class="pure-g" id="layout"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title"><a href="/2023/11/18/kubectl-handy-cmds/">kubectl常用命令</a></h1><div class="post-meta">2023-11-18</div><div class="post-content"><p>kubectl是由Kubernetes提供,使用Kubernetes API与Kubernetes集群的控制平面进行通讯的命令行工具。熟练使用kubectl常用命令将能大大提高Kubernetes相关问题的排查效率。</p>
<p><em>备注:以下是以Windows作为本地机器的命令使用说明。</em></p></div><p class="readmore"><a href="/2023/11/18/kubectl-handy-cmds/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2023/11/12/handy-linux-cmds/">常用的Linux命令</a></h1><div class="post-meta">2023-11-12</div><div class="post-content"><p>当今各种线上运行系统的服务大多数都是基于Linux环境部署的,那么掌握一些Linux常用的命令,将会大大提高日常的开发工作以及线上问题的排查的效率。</p>
<p><strong>搜索执行过的历史命令</strong></p>
<ul>
<li>Ctrl+R:可以根据输入的内容搜索最近一次执行过的相关命令,再次按下Ctrl+R可以继续搜索更早的命令;</li></div><p class="readmore"><a href="/2023/11/12/handy-linux-cmds/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2023/07/08/windows-nuget-package-local-feeds/">Windows本地搭建nuget包源</a></h1><div class="post-meta">2023-07-08</div><div class="post-content"><p>在项目开发中,有时我们需要封装一个类库来供其他的项目或服务使用,在正式发布类库的nuget包之前,一般我们会在本地写个Demo或者本组的其他服务需要使用这个类库,这时在本地搭建一个nuget package源,并将新的nuget包上传上去,如此一来在本地进行调试和修改类库代码就方便的多。接下来我们看下如果在本地生成nuget包,如何将其添加到本地搭建的nuget包源,以及如何使用本地nuget包。</p></div><p class="readmore"><a href="/2023/07/08/windows-nuget-package-local-feeds/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2023/06/17/aspnetcore-unittest-ilogger-moq/">单元测试中如何通过Moq测试ILogger方法</a></h1><div class="post-meta">2023-06-17</div><div class="post-content"><p>在项目中我们一般不会对日志逻辑进行测试,但是对于一些相对重要的场景,希望日志必须被记录,那可以通过单元测试来保证。接下来我们看下如何对logger.Log方法进行单元测试。</p>
<h3 id="实例"><a class="header-anchor" href="#实例">¶</a>实例</h3></div><p class="readmore"><a href="/2023/06/17/aspnetcore-unittest-ilogger-moq/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2023/05/28/aspnetcore-response-onstarting-unittest/">如何对HttpResponse.OnStarting()进行单元测试</a></h1><div class="post-meta">2023-05-28</div><div class="post-content"><p>之前一篇<a href="https://jeremylj.github.io/2023/05/18/aspnetcore-read-write-cookie">AspNetCore服务端读写浏览器Cookie</a>里使用了HttpResponse.OnStarting()方法通过注册回调来实现往Response里写入cookie。本篇我们看一下如何对其进行单元测试。</p></div><p class="readmore"><a href="/2023/05/28/aspnetcore-response-onstarting-unittest/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2023/05/18/aspnetcore-read-write-cookie/">AspNetCore服务端读写浏览器Cookie</a></h1><div class="post-meta">2023-05-18</div><div class="post-content"><p>现在大部分的Web网站都应该采用了前后端分离的架构,所以一般服务端都不用处理浏览器cookie相关的逻辑,前端根据需要将cookie数据以特定Http Request Header/Body的形式传给服务端API,并将API返回的Http Response Header以及Body的内容按需写入cookie。但凡事总有例外,如果前端和后端都是按照不同的功能模块以微服务的架构进行拆分,那么前端的多个不同页面很可能是由多个不同的开发团队来进行开发和部署的。对于某个特定模块的后端API被多个不同的前端页面调用,而该后端API若想通过浏览器cookie来在客户端和服务端之间保持一个特定的状态标识,就需要考虑如何实现可以将改动的范围限制在最小。一般情况下浏览器发起API请求默认都会带上cookie(跨域请求也可以主动传递cookie),所以主要改动还是各个页面将API返回的状态标识回写到cookie。为了不让调用API的每个页面(团队)都增加回写cookie的逻辑,可以仅在该服务端进行cookie更新设定,这样只需要修改一处,主要就是借助Http Response的Set-Cookie来实现。</p></div><p class="readmore"><a href="/2023/05/18/aspnetcore-read-write-cookie/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2021/01/09/aspnetcore-grpc-without-tls/">(四)配置AspNetCore gRPC使用HTTP</a></h1><div class="post-meta">2021-01-09</div><div class="post-content"><p>gRPC是基于HTTP2的,同时支持Http和Https协议。在开发环境,AspNetCore gRPC模板项目默认是使用TLS的,并通过开发证书来提供Https访问,这就是我们在<a href="https://jeremylj.github.io/2020/12/30/aspnetcore_grpc_start/#%E8%BF%90%E8%A1%8CgRPC%E6%9C%8D%E5%8A%A1">(一)AspNetCore集成gRPC体验</a>中遇到的,当第一次运行gRPC服务时,会看到一个提示安装和信任证书的确认框。</p></div><p class="readmore"><a href="/2021/01/09/aspnetcore-grpc-without-tls/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2021/01/06/aspnetcore-grpc-client-aspnetcore/">(三)通过AspNetCore客户端访问AspNetCore Grpc服务</a></h1><div class="post-meta">2021-01-06</div><div class="post-content"><p>上一篇<a href="https://jeremylj.github.io/2021/01/04/aspnetcore-grpc-client-dotnet/">(二)通过.Net控制台客户端访问AspNetCore Grpc服务</a>我们知道如何通过.Net控制台客户端访问AspNetCore Grpc服务,本篇我们一起来看下如何通过AspNetCore客户端访问Grpc服务。</p></div><p class="readmore"><a href="/2021/01/06/aspnetcore-grpc-client-aspnetcore/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2021/01/04/aspnetcore-grpc-client-dotnet/">(二)通过.Net控制台客户端访问AspNetCore Grpc服务</a></h1><div class="post-meta">2021-01-04</div><div class="post-content"><p>通过前一篇<a href="https://jeremylj.github.io/2020/12/30/aspnetcore_grpc_start">(一)AspNetCore集成gRPC体验</a>,我们创建了一个AspNetCore gRPC服务,现在我们就来看下如何通过.Net控制台客户端来访问gRPC服务的SayHello方法<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup>。</p></div><p class="readmore"><a href="/2021/01/04/aspnetcore-grpc-client-dotnet/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2021/01/01/connect-github-by-ssh/">通过SSH连接GitHub</a></h1><div class="post-meta">2021-01-01</div><div class="post-content"><p>之前一直使用账号密码的方式连接GitHub,进行远程仓库代码的拉取和推送,因为账号密码认证的小窗口会记住账号密码,所以感觉也还挺方便的。不过GitHub出了新规:Git操作的身份验证将放弃密码<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup>,改用令牌或SSH密钥<sup class="footnote-ref"><a href="#fn2" id="fnref2">[2]</a></sup>。下面截图是博主最近使用密码进行GitHub认证后,GitHub注册邮箱收到的一封提醒邮件。<br></div><p class="readmore"><a href="/2021/01/01/connect-github-by-ssh/">阅读全文</a></p></div><nav class="page-navigator"><span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="extend next" rel="next" href="/page/2/">下一页</a></nav></div></div><div class="pure-u-1-4 hidden_mid_and_down"><div id="sidebar"><div class="widget"><div class="widget-title"><i class="fa fa-folder-o"> 分类</i></div></div><div class="widget"><div class="widget-title"><i class="fa fa-star-o"> 标签</i></div><div class="tagcloud"><a href="/tags/dotNetCore/" style="font-size: 15px;">dotNetCore</a> <a href="/tags/gRPC/" style="font-size: 15px;">gRPC</a> <a href="/tags/TLS/" style="font-size: 15px;">TLS</a> <a href="/tags/git/" style="font-size: 15px;">git</a> <a href="/tags/github/" style="font-size: 15px;">github</a> <a href="/tags/ssh/" style="font-size: 15px;">ssh</a> <a href="/tags/serverSideCookie/" style="font-size: 15px;">serverSideCookie</a> <a href="/tags/WebApi/" style="font-size: 15px;">WebApi</a> <a href="/tags/unitTest/" style="font-size: 15px;">unitTest</a> <a href="/tags/responseOnStarting/" style="font-size: 15px;">responseOnStarting</a> <a href="/tags/moq/" style="font-size: 15px;">moq</a> <a href="/tags/Windows/" style="font-size: 15px;">Windows</a> <a href="/tags/netcore/" style="font-size: 15px;">netcore</a> <a href="/tags/dotnet-pack/" style="font-size: 15px;">dotnet pack</a> <a href="/tags/nuget/" style="font-size: 15px;">nuget</a> <a href="/tags/linux/" style="font-size: 15px;">linux</a> <a href="/tags/%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" style="font-size: 15px;">常用命令</a> <a href="/tags/kubectl/" style="font-size: 15px;">kubectl</a></div></div><div class="widget"><div class="widget-title"><i class="fa fa-file-o"> 最近文章</i></div><ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2023/11/18/kubectl-handy-cmds/">kubectl常用命令</a></li><li class="post-list-item"><a class="post-list-link" href="/2023/11/12/handy-linux-cmds/">常用的Linux命令</a></li><li class="post-list-item"><a class="post-list-link" href="/2023/07/08/windows-nuget-package-local-feeds/">Windows本地搭建nuget包源</a></li><li class="post-list-item"><a class="post-list-link" href="/2023/06/17/aspnetcore-unittest-ilogger-moq/">单元测试中如何通过Moq测试ILogger方法</a></li><li class="post-list-item"><a class="post-list-link" href="/2023/05/28/aspnetcore-response-onstarting-unittest/">如何对HttpResponse.OnStarting()进行单元测试</a></li><li class="post-list-item"><a class="post-list-link" href="/2023/05/18/aspnetcore-read-write-cookie/">AspNetCore服务端读写浏览器Cookie</a></li><li class="post-list-item"><a class="post-list-link" href="/2021/01/09/aspnetcore-grpc-without-tls/">(四)配置AspNetCore gRPC使用HTTP</a></li><li class="post-list-item"><a class="post-list-link" href="/2021/01/06/aspnetcore-grpc-client-aspnetcore/">(三)通过AspNetCore客户端访问AspNetCore Grpc服务</a></li><li class="post-list-item"><a class="post-list-link" href="/2021/01/04/aspnetcore-grpc-client-dotnet/">(二)通过.Net控制台客户端访问AspNetCore Grpc服务</a></li><li class="post-list-item"><a class="post-list-link" href="/2021/01/01/connect-github-by-ssh/">通过SSH连接GitHub</a></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-external-link"> 友情链接</i></div><ul></ul><a href="http://www.example1.com/" title="site-name1" target="_blank">site-name1</a><ul></ul><a href="http://www.example2.com/" title="site-name2" target="_blank">site-name2</a><ul></ul><a href="http://www.example3.com/" title="site-name3" target="_blank">site-name3</a></div></div></div><div class="pure-u-1 pure-u-md-3-4"><div id="footer">Copyright © 2023 <a href="/." rel="nofollow">老骥伏枥.</a> Powered by<a rel="nofollow" target="_blank" href="https://hexo.io"> Hexo.</a><a rel="nofollow" target="_blank" href="https://github.com/tufu9441/maupassant-hexo"> Theme</a> by<a rel="nofollow" target="_blank" href="https://github.com/pagecho"> Cho.</a></div></div></div><a class="show" id="rocket" href="#top"></a><script type="text/javascript" src="/js/totop.js?v=0.0.0" async></script><script type="text/javascript" src="//cdn.jsdelivr.net/gh/fancyapps/fancybox/dist/jquery.fancybox.min.js" async></script><script type="text/javascript" src="/js/fancybox.js?v=0.0.0" async></script><link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox/dist/jquery.fancybox.min.css"><script type="text/javascript" src="/js/copycode.js" successtext="复制成功!"></script><link rel="stylesheet" type="text/css" href="/css/copycode.css"><script type="text/javascript" src="/js/codeblock-resizer.js?v=0.0.0"></script><script type="text/javascript" src="/js/smartresize.js?v=0.0.0"></script></div></body></html>