string(2) "33" Development | Marco Nie
分类 Development 下的文章

一般浏览器都可以将当前页面输出为 pdf,但当有很多个 html 文件时一个一个转换就很麻烦了,可以使用 wkhtmltopdf 命令行工具来实现自动化批量转换。

wkhtmltopdf and wkhtmltoimage are open source (LGPLv3) command line tools to render HTML into PDF and various image formats using the Qt WebKit rendering engine. These run entirely "headless" and do not require a display or display service.

wkhtmltopdf 官网:https://wkhtmltopdf.org/
GitHub 主页:https://github.com/wkhtmltopdf/wkhtmltopdf

阅读全文



最近自己做了一个 typecho 的主题,主要是手机端的页面优化和字体优化,使用了 bootstrap 来渲染,主题在 GitHub 上开源:https://github.com/nie11kun/TypechoAwesome

但是测试发现搜索框无法正确搜索,总是返回主页。

今天终于发现问题所在了,由于我的网站使用的 NS 服务是 cloudflare 的,在当时设置的时候,把移动端 Mobile Redirect 优化选择上了,每次访问网站都会重定向到 m.niekun.net,估计是 cf 做了什么精简,导致功能丢失,把 Mobile Redirect 关闭就正常了。

具体修改路径是 speed - optimisation:
2020-03-03T14:33:02.png

页面拉到最下方,将 Mobile Redirect 关掉:
2020-03-03T14:33:36.png

再次访问主页,就不会重定向到 m.niekun.net 而是 niekun.net 了。


2020-02-28T08:41:44.png

aria2 是一款轻量级的下载器,支持 HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink 等多种协议。

它有如下特点:

  • 多节点链接:下载一个文件可以同时链接多个源来提速
  • 轻量级:占用系统资源极少,一般下载任务内存占用 10mb 内
  • 全功能的 BitTorrent 客户端:支持 DHT, PEX, Encryption, Magnet URI, Web-Seeding, Selective Downloads, Local Peer Discovery and UDP tracker
  • 支持 metalink 链接
  • 支持远程控制:支持 RPC 界面控制 aria2 进程

官网:https://aria2.github.io/
GitHub 主页:https://github.com/aria2/aria2
webui-aria2:https://github.com/ziahamza/webui-aria2

阅读全文


2020-02-27T01:06:24.png

boost 是很流行的一个 c++ 库,他的部分模块使用只需要引用 head 文件即可,部分需要编译链接库才能使用。下面介绍如何编译模块的静态链接库。

官方网站:https://www.boost.org/
开始教程:https://www.boost.org/doc/libs/1_72_0/more/getting_started/windows.html
官方编译教程:https://www.boost.org/doc/libs/1_72_0/more/getting_started/windows.html#prepare-to-use-a-boost-library-binary
关于 B2 编译系统:https://boostorg.github.io/build/
关于 Microsoft Visual C++(MSVC) 版本号:https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering
关于静态库和动态库:https://blog.csdn.net/qq_41979948/article/details/129693847

阅读全文