Ubuntu Syncthing

Install Syncthing on Ubuntu Server

Install Syncthing Debian/Ubuntu installation instructions Import PGP keys # Add the release PGP keys: sudo curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg Add APT source # Add the "stable" channel to your APT sources: echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list Install Syncthing # Update and install syncthing: sudo apt-get update sudo apt-get install syncthing Install systemd unit Download service file wget https://github.com/syncthing/syncthing/blob/main/etc/linux-systemd/system/syncthing%40.service Install service file sudo chown root:root syncthing@.service sudo mv syncthing@....

July 14, 2023 · Aimer Neige
One Plus Google Play

Install Google Play Store at One Plus Ace2

Today, I buy a new phone One Plus ACE 2. It’s a good phone and it contains GMS which can be enabled from settings. But it did not give you a google play store, which I really need to install some paid apps. So here is how you can install one. Enable GMS From Settings Open your settings app, search google. Click the first result Google Mobile Services. Enable Google Mobile Services....

March 15, 2023 · Aimer Neige
Docker qBittorrent-nox

Install qBittorrent-nox Inside Docker

Install docker You need to install docker first before get started. Take fedora as an example, just simply run these command: # First, remove old docker packages sudo dnf remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine # Install latest docker via dnf package manager # Set up the repository sudo dnf -y install dnf-plugins-core sudo dnf config-manager \ --add-repo \ https://download....

March 14, 2023 · Aimer Neige
Docker

Docker Basic Notes

This post is just a simple note. More detail in this video: https://www.youtube.com/watch?v=3c-iBn73dDE Difference Image and Container CONTAINER is a running environment for IMAGE virtual file system port blinded: talk to application running inside of container application image: postgres, redis, mongo, … redis in dockerhub are images docker pull postgres docker pull redis # lists installed images docker images docker run redis # `-d` means running in detached mode docker run -d redis # lists running container docker ps # lists running and stopped container docker ps -a # stops the container docker stop <CONTAINER ID> # start the container docker start <CONTAINER ID> # pulls image and starts container docker run redis:4....

March 13, 2023 · Aimer Neige
Friend Link

Add Friend Link in PaperMod Blog

PaperMod is a good hugo blog theme, but it did not support a friend link officially. So you need to do some simple customize. Full Code Put this shortcode into layouts/shortcodes/friends.html Usage Add your friends in data/friends.yml like this: - title: "伞" intro: "一只咸鱼的学习记录" link: "https://umb.ink/" image: "https://avatars.githubusercontent.com/u/53655863?v=4" - title: "HelloWorld的小博客" intro: "这里是一个小白的博客" link: "https://mzdluo123.github.io/" image: "https://avatars.githubusercontent.com/u/23146087?v=4"

March 12, 2023 · Aimer Neige
lxgw

Set Custom Fonts in PaperMod Site

Download fonts Download the fonts you need and put it into static/fonts Import your fonts @font-face { font-family: "LXGWWenKai-Regular"; src: url("/fonts/lxgw-wenkai/LXGWWenKai-Regular.ttf") format("truetype"); } Apply it in css body { font-family: LXGWWenKai-Regular; } Use in PaperMod Put your own css file in assets/css/extended/custom_fonts.css Import multi-weight fontfamily @font-face { font-family: "LXGWWenKai"; src: url("/fonts/lxgw-wenkai/LXGWWenKai-Light.ttf") format("truetype"); font-weight: lighter; font-style: normal; } @font-face { font-family: "LXGWWenKai"; src: url("/fonts/lxgw-wenkai/LXGWWenKai-Regular.ttf") format("truetype"); font-weight: normal; font-style: normal; } @font-face { font-family: "LXGWWenKai"; src: url("/fonts/lxgw-wenkai/LXGWWenKai-Bold....

March 2, 2023 · Aimer Neige
Spotify Logo

Spotify Short Codes

Today, I accidentally found a good music from Spotify. I want to share it on my blog, so I try this awesome code. Bellow are the what it look like: Full code from j-un: Download this html file or copy the code, put it in layouts/shortcodes/spotify.html. Enjoy it!

March 1, 2023 · Aimer Neige
go banner

How to Add Multiple Tags to Go Struct

It is easy but always be forgotten, so write this post Incorrect type Page struct { PageId string `bson:"pageId",json:"pageId"` Meta map[string]interface{} `bson:"meta",json:"pageId"` } Correct type Page struct { PageId string `bson:"pageId" json:"pageId"` Meta map[string]interface{} `bson:"meta" json:"pageId"` } More tags Items []Item `gorm:"column:items,type:varchar(255);comment:'sample column'" json:"items"` Links StackOverflow - How to define multiple name tags in a struct

February 26, 2023 · Aimer Neige
KVM Logo

Install kvm on Fedora

KVM: Kernel-Based Virtual Machine Products Company VirtualBox Oracle VMWare VMWare Hyper-V Microsoft First, use x86 laptop or pc. # check if kvm avaiable (output should bigger than 0) egrep -c '(vmx|svm)' /proc/cpuinfo if output is 0, enable vt on BIOS. Install KVM on fedora36 # Install required virtualization packages sudo dnf -y install bridge-utils libvirt virt-install qemu-kvm # Also install useful tools for virtual machine management sudo dnf -y install libvirt-devel virt-top libguestfs-tools guestfs-tools qemu-kvm: the emulator itself libvirt-daemon: runs virtualization in background birdge-utils: important networking dependencies virt-manager: the graphical program we’ll use to work with our VMs sudo usermod -aG libvirt aimer sudo usermod -aG kvm aimer sudo systemctl start libvirtd sudo systemctl enable libvirtd Virtual Machine Manager (or “virt-manager”)...

February 25, 2023 · Aimer Neige
eEFInd logo

Install rEFInd on Fedora

rEFInd on Fedora Install Obtain an rEFInd binary for RPM based system. direct link (not the newest) Find the newest rpm package download link from here. After you download a rpm package, install it with your package manager sudo dnf install refind-0.6.11-1.x86_64.rpm sudo rpm -Uvh refind-0.6.11-1.x86_64.rpm sudo yum localinstall refind-0.6.11-1.x86_64.rpm At the most of the time, your are ready to use rEFInd, if it did not work on your system, run refind-install:...

November 20, 2022 · Aimer Neige