x-www-form-urlencoded vs JSON, which one is better?
This old blog has given a strong answer.
This old blog has given a strong answer.
I haven't used my old MBP 13 for nearly a month. This evening I picked it up and opened the iTerm2 then connected to my home server through ssh. I noticed I get a white-black colored terminal. What's wrong? I remembered it was colorful when I logged into this machine last time using iTerm2 on my MBP 15.
Firstly, I checked the version of iTerm2, it was a bit old, so I updated it first. Unfortunately, it doesn't help. I noticed I was using bash instead of zsh on this machine. So I ran chsh and changed the shell from bash to ssh. It also doesn't help. Then I find this answer from stackoverflow.com. A comment in this answer reminded me: I should check and compare the terminal configuration in iTerm2. So I found the secret!
Command + ,
open the preference, then click the profiles
tab, then change the Report terminal type
from xterm
to xterm-256
color, that's it!
I didn't forget I haven't set up a backup system for this blog site. So I got it done today.
Two things need to backup, they are
uploads
directory that contains the pictures, files you've uploaded to this siteSince local backup is not safe, finally I chose the Yandex.Disk as my cloud storage. Just register an account in 5 minutes and you will get 10G cloud storage with Linux friendly sync feature. Yandex.Disk also supports symbol links, that's quite good.
run crontab -e
and fill in below lines, the setting was done!
15 3 * * * mysqldump --databases blog | gzip > /home/zhongwei/Yandex.Disk/backups/mysql/blog_`date '+\%Y\%m\%d-\%H\%M\%S'`.sql.gz
20 3 * * * find /home/zhongwei/Yandex.Disk/backups/mysql/blog* -mtime +30 -exec rm {} \;
As the uploads folder for my blog, what you need to do is creating a symbol link to the Yandex.Disk folder:
ln -s /www/blog/uploads /home/zhongwei/Yandex.Disk/backups/blog_uploads
This blog is inspired by source
这些天受疫情影响,我只能在家工作。我的工作台的右侧,就是正门门前的那块空地。平常我们都是使用后院的门,正门极少使用。这块空地就成了麻雀经常光顾的地方。
而我呢,工作累了,或者想偷懒的时候,往右一瞥往往就会看到它们或者在玩,或者在吃东西。虽然并没有人惊吓它们,但我却感到它们不像新西兰别的鸟。那些鸟大多大大咧咧的不怎么怕人,甚至懒得飞,即使你驱赶它们,它们也经常用快跑代替飞。麻雀总是警觉的,不论是吃还是玩,都是玩一秒钟或者吃两秒钟,就赶紧四顾看看有没有危险。我从没有看到过它放松的时刻。
这么警觉的动物会活得很长吧,并不。日日过着担惊受怕的生活,怎么可能长寿呢。查了一下,果然。普通麻雀在野外的寿命也就三年。
可爱又可怜的小精灵啊。
with Eric yesterday evening. This is the second time I watched it. A moving film about two lovely robots.