Maintain my website
link
ALWAYS!
Write a script that can transfer my obsidian note to website
DONE!
Create a game, namely Besiege2.0
WORKING~
link
ALWAYS!
DONE!
WORKING~
github
config
config directory:~/.config/awesome/
doc
in the config file rc.lua
1 | awful.spawn("picom --experimental-backend") |
1 | sudo dpkg -i *.deb |
1 | chmod +777 *.AppImage |
1 | sudo apt -f install |
See all the process:
1 | ps aux |
Find the target pid
1
pgrep [partial name]
return the pid of the process
kill the process
1
kill [pid]
Search for confirmed strings in file
1 | grep [option] [pattern] [file] |
display the battery percentage
1 | upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage |
SSH (Secure Shell) is a network security protocol that provides secure access and file transfer through encryption and authentication mechanisms. It encrypts and verifies network data to provide secure login and other secure network services.
SSH uses a combination of public and private keys to secure communication. The public key is used to encrypt data, while the private key is used to decrypt data. This ensures that even if data is intercepted during transmission, attackers cannot decrypt it, ensuring data security.
An SSH agent is a program that stores private keys and can help you avoid having to enter your passphrase every time you use SSH. When you add a private key to an SSH agent, you only need to enter the passphrase the first time you use the key. After that, the SSH agent will automatically provide the private key for you.
You can use the ssh-keygen
tool to generate a new SSH key pair. Here’s an example of how to use ssh-keygen
to generate an RSA key pair:
1 | ssh-keygen -t rsa -b 4096 -C “your_email@example.com” |
In this command:
-t rsa
specifies the type of key to create. In this case, we’re creating an RSA key.-b 4096
specifies the number of bits in the key. In this case, we’re creating a 4096-bit key.-C "your_email@example.com"
adds a comment to the key. This can be any text you like, but it’s common to use your email address.After running this command, ssh-keygen
will prompt you for a location to save the key pair and for a passphrase to secure the private key. You can accept the default location by pressing Enter, or you can specify a different location if you prefer. If you don’t want to use a passphrase, you can leave it blank by pressing Enter.
On Ubuntu, you can add a key to the ssh-agent
by following these steps:
ssh-agent
is running. You can start it by running the eval "$(ssh-agent -s)"
command.ssh-add ~/.ssh/id_rsa
command to add your first key (the one you commonly use) to the ssh-agent
. If your key file is not in the default location (i.e., ~/.ssh/id_rsa
), replace the path in the command with the actual path of your key file.After completing these steps, you have successfully added your first key to the ssh-agent
. Now when you use SSH to connect to a remote server, the ssh-agent
will automatically provide your private key.
On Ubuntu, you can view the keys added to the ssh-agent
by running the ssh-add -l
command. This command lists the fingerprints of all keys in the ssh-agent
.
magma-nvim
Magma is a NeoVim plugin for running code interactively with Jupyter.
Jupynium.nvim
It’s just like a markdown live preview, but it’s Jupyter Notebook live preview!
Jupynium uses Selenium to automate Jupyter Notebook, synchronising everything you type on Neovim.
Never leave Neovim. Switch tabs on the browser as you switch files on Neovim.
In nvim:
1 | :h standard-path |
CONFIG DIRECTORY (DEFAULT)
$XDG_CONFIG_HOME Nvim: stdpath(“config”)
Unix: ~/.config ~/.config/nvim
Windows: ~/AppData/Local ~/AppData/Local/nvim
DATA DIRECTORY (DEFAULT)
$XDG_DATA_HOME Nvim: stdpath(“data”)
Unix: ~/.local/share ~/.local/share/nvim
Windows: ~/AppData/Local ~/AppData/Local/nvim-data
RUN DIRECTORY (DEFAULT)
$XDG_RUNTIME_DIR Nvim: stdpath(“run”)
Unix: /tmp/nvim.user/xxx /tmp/nvim.user/xxx
Windows: $TMP/nvim.user/xxx $TMP/nvim.user/xxx
STATE DIRECTORY (DEFAULT)
$XDG_STATE_HOME Nvim: stdpath(“state”)
Unix: ~/.local/state ~/.local/state/nvim
Windows: ~/AppData/Local ~/AppData/Local/nvim-data
Note: Throughout the user manual these defaults are used as placeholders, e.g.
“~/.config” is understood to mean “$XDG_CONFIG_HOME or ~/.config”.
In nvim, I use plugin fugitive
open two vertical buffer (one form target, another from feature)
1 | :Gvdiffsplit! |
stay on middle and use
1 | :diffget [buffername](local) |
OR
go to target/feature buffer and use
1 | :diffput [buffername](target/feature) |
save the local file and use
1 | :Git add . |
mod name: ModernAirCombat
1 | $createmod "ModernAirCombat" |
modify ./Mod.xml
1 | $createblock "ModernAirCombat" "SRAAM" |
1 | mkdir ./Resources/SRAAM |
add assets of SRAAM block r73.obj
, r73.png
modify ./Mod.xml
1 | <Mesh name="SRAAM Mesh" path="SRAAM\r73.obj"/> |
modify ./SRAAM.xml
create assembly for scripts
1 | createassembly "ModernAirCombat" compiled MacAssembly ModernAirCombat forceUnityTools |
open project with VStudio
edit ModernAirCombat.cs
1 | using System; |
add a block class SRAAM.cs
1 | using System; |
modify SRAAM.xml
1 | <Script>ModernAirCombat.SRAAMBlock</Script> |