harttle.github.io icon indicating copy to clipboard operation
harttle.github.io copied to clipboard

Harttle Land 的源码和文章

Results 109 harttle.github.io issues
Sort by recently updated
recently updated
newest added

# 状态码很重要 | Harttle Land 我们知道 HTTP 状态码 用来标识响应的状态,不恰当的状态码可能会影响 SEO,用户体验和可访问性,甚至产生不可恢复的线上问题。因为状态码不仅仅是客户端 AJAX 的返回值,它对 Web 系统架构有着重要的影响。但有些网站从不返回 4xx,用 3x... [https://harttle.land/2020/06/25/status-code-matters.html](https://harttle.land/2020/06/25/status-code-matters.html)

# SSH 配置端口转发 | Harttle Land SSH 隧道或 SSH 端口转发可以用来在客户端和服务器之间建立一个加密的 SSH 连接,通过它来把本地流量转发到服务器端,或者把服务器端流量转发到本地。比如从本地访问服务器上的 MySQL 管理后台,或者把本地的串流、SMB、CIFS 等服务暴露在... [https://harttle.land/2022/05/02/ssh-port-forwarding.html](https://harttle.land/2022/05/02/ssh-port-forwarding.html)

# ArchLinux 休眠到交换文件 | Harttle Land Linux 使用交换分区来休眠,首先冻结所有进程并申请足够的交换内存(位于磁盘),把当前内存都存进去。然后下次启动时,initramfs 会直接加载上次休眠时的内存状态,跳过内核的 init 过程。因此首先需要有足够大的交换分区或交换文件;再把内核指... [https://harttle.land/2019/10/19/hibernate-archlinux.html](https://harttle.land/2019/10/19/hibernate-archlinux.html)

# Effective C++ 42:typename 的两种用法 | Harttle Land 模板参数前的typename和class没有任何区别;但 typename还可以用来帮编译器识别嵌套从属类型名称,基类列表和成员初始化列表除外。 [https://harttle.land/2015/09/09/effective-cpp-42.html](https://harttle.land/2015/09/09/effective-cpp-42.html)

# Effective C++ 46:需要类型转换时,应当在类模板中定义非成员函数 | Harttle Land 如果所有参数都需要隐式类型转换,该函数应当声明为非成员函数。本文把这个观点推广到类模板和函数模板。但是在类模板中,需要所有参数隐式转换的函数应当声明为友元并定义在类模板中。 [https://harttle.land/2015/09/14/effective-cpp-46.html](https://harttle.land/2015/09/14/effective-cpp-46.html)

# Linux 下共享代理到局域网 | Harttle Land 这个博客在八年前分享过 用 Linux 做 WiFi 热点,今天的设备和软件已经完全不同了。可以很方便地做曾经很复杂的事情,同时这个世界也更复杂了。现在我们要实现的是 把代理分享给局域网,连上 WiFi 即连上了代理。这件事最简单的办法是直接刷一个 ... [https://harttle.land/2022/11/22/linux-share-proxy-over-lan.html](https://harttle.land/2022/11/22/linux-share-proxy-over-lan.html)

# Effective C++ 50:为什么需要自定义 new 和 delete? | Harttle Land 实现一个operator new很容易,但实现一个好的operator new却很难。 [https://harttle.land/2015/09/19/effective-cpp-50.html](https://harttle.land/2015/09/19/effective-cpp-50.html)

# Effective C++ 31:最小化文件之间的编译依赖 | Harttle Land 最小化编译依赖的一般做法是依赖于声明而非定义,这个想法可以通过句柄类或接口类来实现。库的声明应当包括“完整的”和“只有声明的”两种形式。 [https://harttle.land/2015/08/29/effective-cpp-31.html](https://harttle.land/2015/08/29/effective-cpp-31.html)

# Vim 多文件编辑:窗口 | Harttle Land 标签页(tab)、窗口(window)、缓冲区(buffer)是Vim多文件编辑的三种方式,它们可以单独使用,也可以同时使用。它们的关系是这样的: A buffer is the in-memory text of a file. A windo... [https://harttle.land/2015/11/14/vim-window.html](https://harttle.land/2015/11/14/vim-window.html)