Setup Your Own Apt Mirror

What you need a server running ubuntu enough disk space (at least 600G) good internet connection a domain name (optional) a ssl certificate (optional) Prepare your server You can buy a cloud server, or use a local machine. Here, I am using a local machine to setup a offline apt mirror which can speed up my workflow. Install apt-mirror Just run the following command to install apt-mirror on your server: ...

December 14, 2024 · Aimer Neige

How to Setup Your Fabric Workspace

Prepare JDK and IDE Just simply download IntellJ IDEA Community is good for fabric development. Keep in mind that you must download jdk-17 for development. You can download the jdk inside IDEA or download it manually. But don’t forget to setup in IDEA. Download Template You can download a template in fabric template mod generator. Setup your own Mod Name, Mod ID and Package Name. Select the newest minecraft version and download the zip file. ...

March 17, 2024 · Aimer Neige

Boot Fedora From Windows Hyper-V

Enable Hypyer-V disk manager -> offline create vm. skip the disk creation open vm settings. select physical disk instead of vhd Disable secure boot and checkpoint https://superuser.com/questions/1284201/hyper-v-boot-to-os-on-physical-disk

March 8, 2024 · Aimer Neige
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@.service /etc/systemd/system/ sudo systemctl daemon-reload Enable service ...

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. Login in your google account at Google if you want. Install Google Play Store After you enable GMS, all you need to do next is install a google play store. ...

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.docker.com/linux/fedora/docker-ce.repo # Install Docker Engine sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Start Using Docker # Start Docker sudo systemctl start docker # Start Docker As System Boot sudo systemctl enable docker # Test If Docker Works sudo docker run hello-world View Docs for more detail about how to install docker in ubuntu system. ...

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.0 CONTAINER Ports vs HOST ports Multiple containers can run on your host machine Your laptop has only certain ports available Conflict when same port on host machine host docker Port 5000 Port 5000 Port 3000 Port 3000 Port 3001 Port 3000 docker run -p6000:6379 redis docker logs <CONTAINER ID> docker logs <CONTAINER NAMES> docker run -d -p6000:6379 --name redis-older redis:4.0 # it Interactive Terminal docker exec -it <CONTAINER ID> /bin/bash docker exec -it <CONTAINER NAMES> /bin/bash # if no bash installed docker exec -it <CONTAINER ID> /bin/sh docker exec -it <CONTAINER NAMES> /bin/sh # create a new container from a image docker run # start a exist container docker start docker pull mongo docker pull mongo-express docker network ls docker network create <NETWORK NAME> docker run -d \ -p 27017:27017 \ -e MONGO_INITDB_ROOT_USERNAME=admin \ -e MONGO_INITDB_ROOT_PASSWORD=password \ --network mongo-network \ --name mongodb \ mongo docker run -d \ -p 8081:8081 \ -e ME_CONFIG_MONGODB_ADMINUSERNAME=admin \ -e ME_CONFIG_MONGODB_ADMINPASSWORD=password \ -e ME_CONFIG_MONGODB_PORT=27017 \ -e ME_CONFIG_MONGODB_SERVER=mongodb \ --net mongo-network \ --name mongo-express \ mongo-express docker logs <CONTAINER ID> -f docker logs <CONTAINER ID> | tail docker logs <CONTAINER ID> | more Docker Compose docker run command ...

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 <style type="text/css"> .friends { --link-count-per-row: 1; } @media screen and (min-width: 576px) { .friends { --link-count-per-row: 2; } } @media screen and (min-width: 768px) { .friends { --link-count-per-row: 3; } } .friends { display: grid; grid-template-columns: repeat(var(--link-count-per-row), 1fr); grid-gap: 16px; } /* 空间占位 */ .friend-skeleton { height: 280px; display: inline-block; position: relative; } .friend { height: 100%; width: 100%; position: absolute; top: 0; left: 0; transition: 0.67s cubic-bezier(0.19, 1, 0.22, 1); border-radius: var(--radius); box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12) !important; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; } .friend:hover { transform: translateY(-8px); box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 5px 8px 0 rgba(0, 0, 0, 0.14), 0 1px 14px 0 rgba(0, 0, 0, 0.12) !important; } .friend-avatar { object-fit: cover; width: 100%; height: 180px; margin: 0 !important; border-radius: 0 !important; } .friend-content { text-align: center; flex: 1; width: 100%; padding: 16px; background: var(--entry); transform: translate3d(0, 0, 0); } .friend-name { font-size: 1.2rem; font-weight: bold; transform: inherit; } .friend-description { font-size: 0.8rem; color: var(--secondary); transform: translate3d(0, 0, 0); } </style> <div class="friends"> {{ range .Site.Data.friends }} <div class="friend-skeleton"> <a href="{{ .link }}" target="_blank"> <div class="friend"> <img class="friend-avatar" src="{{ .image }}" /> <div class="friend-content"> <div class="friend-name">{{ .title }}</div> <div class="friend-description">{{ .intro }}</div> </div> </div> </a> </div> {{ end }} </div> <!-- style code by https://github.com/fissssssh --> <!-- view https://github.com/fissssssh/fissssssh.github.io for more detail --> 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" Use shortcodes like this in your post: {{< friends >}} ...

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.ttf") format("truetype"); font-weight: bold; font-style: normal; } Use cdn @import url('https://cdn.jsdelivr.net/npm/jetbrains-mono@1.0.6/css/jetbrains-mono.min.css'); code { font-family: 'JetBrains Mono'; } Links Sulv’s Blog - Hugo博客自定义字体 PaperMod - FAQs StackOverflow - Using custom fonts using CSS? StackOverflow - Multiple font-weights, one @font-face query GitHub - lxgw/LxgwWenKai

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