LinMinquan's Blog

Experience technology to change life

在虚拟机中安装 discourse

先装 git 主要按官方的教程安装 https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md如果不是以 root 用户在操作时,会提示要敲个命令把这个用户加入到 某group 里 If you would like to use Docker as a non-root user, you should now consider adding your user to the “docker” group with something like:  下面命令开始设置 discourse 要设置下面这几个问题 第一个就填刚才 hosts 里加的域名 discourseraw.pl 最后一个问题我是直接回车 skip      Read more →

测试路由器Wifi的传输速度

环境:windows 10,iPhone or Android phone 纯粹测试wifi的最快速度,数据传输没有经过NAT win10电脑网线接路由器Lan口,win10上打开 ubuntu sub linux system, 就启动了 在手机上安装 Network Tools,打开,在左边侧栏选择 Iperf,在顶部选项卡中选择 Iperf3, Interval 填1,即1秒显示一次数据,Bytes填500M,表示要测试500M的数据,然后填上电脑的ip, 点击键盘上的 go,就开始测试了 测试后,手机可以切换2.4G 和 5G进行测试。 Read more →

Windows 10 录系统的声音

环境:windows 10 想要录取操作系统的声音(非麦克风录的声音),例如某个软件的声音。 在声音里将 Stereo Mix 设置为 Set as Default device 然后这时候再打开 Voice Recorder,录到声音就是操作系统的声音了。 Read more →

用rclone在两个onedrive账户间复制数据

将 onedrive 账户 A 的里的文件夹复制到 onedrive 账户 B 我 onedrive 账户 A 的客户端不同步了,只显示其在 updating ,好几个小时也还是那样。我猜想是我里面的文件太多了,有个文件夹有 500 多 GB,且有些像 .git 文件夹,就会有非常多的小文件。(后面微软觉得我有个压缩包有病毒,那只是我写的软件而矣) 照理说,将 B 账户里建个文件夹,share 给 A,然后 A 在网页版里往这个文件夹里复制就行了,但会报错,每次都只复制一个文件,不知道是我里面的哪些文件触发了 onedrive 的什么 bug,也懒得找微软客服。 我是看到下面这篇教程,才知道有 rclone 这个命令行工具的,总的来说还蛮好用的,在 windows 上配置起来也不复杂。 使用 rclone 将 Google Drive 文件同步至 OneDrive有个别文件在复制时会报错,我会用 rclone check 命令去检查 source 和 dest 是否一致,但会在命令最后加上 –size-only 的 tag 在用 rclone copy 时,我会想显示其进度,可以在命令最后加上 -v Read more →

two simple http server tools

http-server install: npm install -g http-server start the server with http-server reference: NodeJS - Setup a Simple HTTP Server / Local Web Server browser-sync install: npm install -g browser-sync start the server with browser-sync start --server Read more →

Can’t display svg file when host on aws s3

.svg 文件上传到 aws s3 + cloudfront 时,有可能在网页上显示不出来,通过 chrome inspect 看的话,该 svg 的 content-type 并不是 image/svg+xml 。 解决办法是在 aws s3 网页上,选中该 svg 文件,右键 -> Properties -> Metadata 中将 content-type 改为 image/svg+xml Read more →

Hugo, Front Matter Variable, Type

Hugo V40.2 Hugo 的 Front Matter Variable有一个是 Type,它的默认值是这篇 post 所在的 directory ,如果这篇 post (假设文件名为 aaa.md ) 所在的目录是 blog ,那它最终的 url 是 xxx.com/blog/aaa/ ,而 Type 可以修改其中的 blog 为其它字符。 我遇到的问题是我的 posts 都是从网站(基于 WordPress )上用插件导出来的,这样每个 post (markdown file) 里的 Front Matter 会有 Type: posts 的属性。有这个设置使得这些 posts (markdown file) 的 template 是基于 posts template ,但这些 posts (markdown file) 其实是放在 blog 目录下的,按照我原来的理解,放在 哪个目录下(例如 blog ),其 template 是基于哪个 template 的(放在 blog 下,就基于 blog template )。但其实这个是可以被 type 这个 Front Matter 给 override 的。 Read more →

Hugo pagination bootstrap4

Hugo V40.2 , Bootstrap 4.1.1 在做 pagination 时,Hugo 文档说可以用内置的跟 Bootstrap 兼容的一个 pagination ,但我在用的时候,出来的样式不对。我看 Jimmysong的 博客源码,他用的就是官方说的内置的 pagination ,但他用的是 Bootstrap3 。 搜了下,有人也发现了 Hugo 说的跟 Bootstrap 兼容的 pagination 只是跟 Bootstrap3 兼容,而不是跟 Bootstrap4 兼容,并给出了解决办法。 Hugo Pagination Partial for Bootstrap4 Read more →