Hexo Theme Auto Update on GitHub Actions

Due to the limitation of git you cannot have a repository inside another with it both modified and uploaded but don’t affect the upstream. It happens that the inner repo does not belong to you but you want to keep it up-to-date with GitHub Actions but still maintain the ability to modify it, here is the solution.

Read More

Deploy Static Blog to Cloudflare Workers With GitHub Actions CI

Initial setups for the blog will be skipped, since it has been done years ago for me.

Cloudflare Workers Setup

I assume you already have a Cloudflare account and a domain using it for DNS resolution.

Read More

All-in-One Solution to Deploy Pleroma in Docker

This solution uses docker-compose to build and run a Pleroma instance on an Amazon Linux 2 machine with NGINX reverse proxy enabled and certbot running periodcally to assign a SSL/TLS certificate. Before doing it, make sure docker and docker-compose are installed on the machine.

Read More

Japanese Gramma Notes

All the notes are beased on Tae Kim’s Guide to Learning Japanese. Thanks a lot!

Read More

Solutions for a Tour of Go

Any suggestions are welcomed!

Exercise: Loops and Functions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main

import (
"fmt"
"math"
)

func Sqrt(x float64) float64 {
z := 1.0
y := x
for ;;z -= (z * z - x) / (2 * z) {
if math.Abs(z - y) < 0.00000001 {
return z
}
y = z
}
}

func main() {
fmt.Println(Sqrt(2))
}

Read More

日语学习笔记 - 形容词与副词

形容词

い形容词

贵:高い(たかい)

Read More

日语学习笔记 - 连词

动词

ます型+ながら~ます。

表同时做两件事。

Read More

日语学习笔记 - 助词

助词:へ、で、を、が、に、は、と等

へ:加在名词后面表目的(方向)

私(わたし)は日本(にほん)へ行き(いき)ます。

Read More

日语学习笔记 - 动词

  • かく(辞书型)
  • かきます(ます型)
  • かいて(て型)
  • かかない(ない型)

Read More

日语学习笔记 - 关于时间的单词

时间

一時:いちじ

二時:にじ

三時:さんじ

四時:よじ

五時:ごじ

Read More