Skip to content

Instantly share code, notes, and snippets.

@Wenbo16
Wenbo16 / sessions.md
Created March 9, 2023 06:20 — forked from joepie91/sessions.md
Introduction to sessions

While a lot of Node.js guides recommend using JWT as an alternative to session cookies (sometimes even mistakenly calling it "more secure than cookies"), this is a terrible idea. JWTs are absolutely not a secure way to deal with user authentication/sessions, and this article goes into more detail about that.

Secure user authentication requires the use of session cookies.

Cookies are small key/value pairs that are usually sent by a server, and stored on the client (often a browser). The client then sends this key/value pair back with every request, in a HTTP header. This way, unique clients can be identified between requests, and client-side settings can be stored and used by the server.

Session cookies are cookies containing a unique session ID that is generated by the server. This session ID is used by the server to identify the client whenever it makes a request, and to associate session data with that request.

*S

@Wenbo16
Wenbo16 / vpn.md
Created July 29, 2020 07:58 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@Wenbo16
Wenbo16 / README-Template.md
Created June 21, 2017 19:36 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
GenericName=Eclipse #第四行是通用名称,图简单的话就用软件名字吧
Comment=Eclipse mars
Exec=/usr/bin/eclipse
#这个很重要,表示的是应用程序可执行文件所在的路径,要写绝对路径,这样比较保险,如果你不知道应用程序的可执行文件的路径,可以用which 应用程序名称来查看。
Icon=/opt/eclipse/icon.xpm #图标
#分类:这个将在应用的编程分类中
Categories=Application;Development;Java;IDE