The original motivation for this article is about following issue:

  • how does the claim identity information persist after login in ASP.NET
  • why does updating of claim identity in owin context not persist in further request

The WIF(Windows Identity Foundation) provides a Claims-Based Identity Model. And in ASP.NET, we can already build a Claims-Aware ASP.NET Web Application. Especially, when using with different kind of authentication middleware, WIF provides the same abstract layer to access the identity information across the whole asp.net pipeline context.

In this article we will talk about some detail about asp.net authentication middleware based on the CookieAuthenticationMiddleware. At the end, let’s discuss more about persist claim in cookie across request.

Read more »

When I use the hexo tag plugin, i found that I cannot use space within the parameter of a tag plugin, even I wrap the parameter with double quote. This confuses me a lot.

Originally, I think this may be the bug of a 3rd party tag plugin for hexo.
But after some investigation, this is the bug of hexo itself.

Read more »

为什么要支持双线路的博客?

  • github国内访问速度缓慢,偶尔甚至无法访问
  • baidu爬虫被github禁用(外媒一撇)
  • 不想放弃github

这样做可以获得什么优势:

  • github对应国外访问,gitcafe对应国内访问,保持速度
  • baidu爬虫抓取gitcafe数据,不会受到github的禁用影响
  • 双线路同一域名,在DNS服务器上实现分流,不会因为主机不同影响最终用户的访问域名

在开始本文之前,强烈建议读一下我的另一篇文章从DNS到github pages自定义域名 – 漫谈域名那些事,可以帮助你熟悉过程中的很多原理。

Read more »

我想,这个标题或许是很多初学者的问题。尤其是像我这样的对C/C++比较熟悉,刚刚进入python殿堂的朋友们
。C/C++的函数参数的传递方式根深蒂固的影响这我们的思维–引用?传值?究竟是那种呢。
语言的特性决定了是使用的方法,那么,现在我们来探究一下python的函数参数传递方式。

Read more »

Helm has been released a long time, but I am always get used to ido.

But based on some article recently, and I am really like new things, so I decided to use the this helm package.

So, let’s start.

Read more »

对于日本旅游来讲,大多数人是不会单独去冲绳旅行的。
而我这次是为了日本的三年签证,所以来了一次冲绳的短期旅行。
因为是只有两天时间的短期旅行,所以并没有进行冲绳的深度游,不能和很多的攻略大神比。
这里只是记录一下旅行中的小片段,和大家分享。

Read more »

I do not notice this issue when I try to use the npm from emacs eshell.
I found that the npm can be found from bash in iTerm2 but cannot be found from emacs eshell.
Then I notice that the emacs do not sync the interal PATH with what you can check from bash.

Read more »