npm install, concerns for me

Tutorials / Web Notes

2018.04.14

npm install, concerns for me

While learning Node.js, install packages is a commonly operation. However, as a newbie, I might install the packages not in the right way. So taking this note to refresh my mind on npm installs.

Contact form for a static site without a backend

Tutorials

2018.03.24

Contact form for a static site without a backend

For a static site like those on GitHub Pages, everything is done in the frontend. The user just downloads a bunch of static files that execute in their browser. But for a "Contact" form, to deal with the submissions we typically need a backend service, either self hosted or a third a third-party service.

JS 本地数据存储之 cookie

JavaScript Notes / Web Notes

2018.03.09

JS 本地数据存储之 cookie

本来只是想简单看看 cookie、localStorage 和 sessionStorage 的,没想到一搜索扩展了很多知识,但是,中心主题还是集中在 web storage (localStorage, sessionStorage) 的认识上,以及怎么使用它们。不过,在此之前,先来简单认识一下 cookie 吧。

初识 ES6

JavaScript Notes

2018.03.08

初识 ES6

虽然 ES8 已经发布,但是以我的基础来说还是从 ES6 (ECMAScript 2015) 开始,此番就跟着 JavaScript by Example 这本书来学习,随手记点笔记,以期长点记性。

中文网页字体设置

Web Notes

2018.03.01

中文网页字体设置

由于中文字体通常体积较大,在 web 中使用中文字体确实需要一些技巧。我也一直在纠结使用什么样的字体能有更好的阅读体验,鼓捣过 Typekit 加载思源宋体,可难免会拖慢加载速度,有时还不能成功加载,只能换回系统内置字体。今天就好好研究下网页字体的使用,一劳永逸!

Get your anaconda ready after brew install

Tutorials

2018.01.27

Get your anaconda ready after brew install

Just add the anaconda into PATH after installing it with Homebrew. If no .bash_profile, you can append the "/usr/local/anaconda3/bin" to the paths file as well.

In-place swap, in C

C Notes / CS Basics

2017.12.14

In-place swap, in C

In-place swap is just a logic trick used to swap a content of two distinct variables without any temporary storage variable.

Shell 正则表达式

Linux Notes

2017.11.28

Shell 正则表达式

正则表达式是你所定义的模式模板 (pattern template),很多程序工具都能用它来过滤文本,在处理数据时使用正则表达式对数据进行模式匹配。如果数据成功匹配模式,它就会被接受并进一步处理;如果数据不匹配模式,它就会被滤掉 (跳过)。

Testing Dialog in shell scripts

Linux Notes

2017.11.28

Testing Dialog in shell scripts

Dialog is an utility for creating professional-looking dialog boxes within shell scripts, this article just follow the tutorial and present the examples of how and where it can be used.