This commit is contained in:
2023-11-03 21:44:38 +01:00
parent 44a1f18b56
commit 4fd063174c
10 changed files with 126 additions and 14 deletions
+11
View File
@@ -5,6 +5,17 @@
- [](#)
<!--toc:end-->
<details>
<summary> Default System Packages</summary>
| Name | Description |
| -------- | ------------------------ |
| Hyprland | Tiling Window Compositor |
| Swaylock | Screenlocker Wayland |
| Waybar | Status Bar |
</details>
#
<details>
@@ -0,0 +1,41 @@
---
syntax: bash
tags: [ atool, archiv ]
---
explanation: Manage archives of various formats.
# List files in a zip archive:
atool --list path/to/archive.zip
# Unpack a tar.gz archive into a new subdirectory (or current directory if it contains only one file):
atool --extract path/to/archive.tar.gz
# Create a new 7zip archive with two files:
atool --add path/to/archive.7z path/to/file1 path/to/file2 ...
# Extract all zip and rar archives in the current directory:
atool --each --extract *.zip *.rar
# To extract all files from archive 'foobar.tar.gz' to a subdirectory (or the current directory if it only contains one file):
aunpack foobar.tar.gz
# To extract all files from all '.tar.gz' archives in the current directory:
aunpack -e *.tar.gz
# To create a zip archive of two files 'foo' and 'bar':
apack myarchive.zip foo bar
# To display the file 'baz' in the archive 'myarchive.zip' through a pager:
acat -p myarchive.zip baz
# To list contents of the rar archive 'stuff.rar':
als stuff.rar
# To create three archives, 'dir1.tar.gz', 'dir2.tar.gz' and 'dir3.tar.gz', so that the first one contains all files in dir1, the second all in dir2 and the third all dir3:
apack -e -F .tar.gz dir1 dir2 dir3
# To show all differences between version 2.4.17 and 2.4.18 of the kernel:
adiff linux-2.4.17.tar.gz linux-2.4.18.tar.gz
# To repack all .tar.gz archives in the current directory to .tar.7z (the old archive will be kept untouched):
arepack -F.tar.7z -e *.tar.gz
@@ -0,0 +1,14 @@
---
syntax: bash
tags: [ lynis, security, audit ]
---
explanation: System and security auditing tool.
# Check that Lynis is up-to-date:
sudo lynis update info
# Run a security audit of the system:
sudo lynis audit system
# Run a security audit of a Dockerfile:
sudo lynis audit dockerfile path/to/dockerfile
@@ -186,6 +186,9 @@ sed 's/Linux/&\ Ubuntu/' os.txt
# Insert an empty line after pattern (after each line containing comment in this case)
sed '/^#/G' file.txt
# Inserting Spaces or Blank Lines in a file To insert two blank Lines
sed 'G;G' tecmint.txt
# Insert contents of file after a certain line
sed '5 r newfile.txt' file.txt
@@ -285,6 +288,9 @@ sed 's/ *//'
# Remove ending commas
sed 's/,$//g'
# Removing ^M in a file
sed -i 's/\r//' myfile.txt
# remove all comments behind lines
sed "/s\s*#*//g" /file
@@ -1,3 +1,9 @@
---
syntax: bash
tags: [ systemd-analyze, security, audit ]
---
explanation: systemd-analyze
############## Basic #######################
# Unit file locations
@@ -28,6 +34,13 @@ systemd-analyze
systemd-analyze blame
########### security ########################
# https://www.redhat.com/sysadmin/mastering-systemd
# Do not change systemd units ever. Those changes will get undone the next time you update. Use overrides instead.
# E.g. if you want to add sandboxing to foo.service, then create a directory /etc/systemd/system/foo.service.d and put a file override.conf (name does not matter, extension does) into it.
# Add the relevant section headers (the lines that start with [ and end with ]) in there followed by the lines you want to add to said section.
# Run sytemctl daemon-reload once you are happy. Use systemctl cat foo.service to check whether the override file was picked up and which settings are now applied to too.service. Restart the service again to test once you are happy.
# Security option/info in manpages for service file hardening
man systemd.exec
+3
View File
@@ -122,6 +122,9 @@ lib32-vulkan-icd-loader
vulkan-radeon
xdg-desktop-portal-hyprland
libreoffice-fresh-de
lynis
atool
goverlay
libtool
libva-vdpau-driver
licenses
+13
View File
@@ -49,3 +49,16 @@ vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "InsertEnter" }, {
end,
group = numbertogglegroup,
})
-- Disable automatically comment next empty line (formatoptions)
vim.api.nvim_create_autocmd("FileType", {
command = "set formatoptions-=cro",
})
-- Disable automatically comment next empty line (formatoptions)
vim.api.nvim_create_autocmd("BufEnter", {
callback = function()
vim.opt.formatoptions:remove({ "c", "r", "o" })
end,
desc = "Disable New Line Comment",
})
+1
View File
@@ -28,6 +28,7 @@ require("lazy").setup({
{ import = "lazyvim.plugins.extras.linting.eslint" },
{ import = "lazyvim.plugins.extras.editor.leap" },
{ import = "lazyvim.plugins.extras.util.project" },
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
{ import = "plugins" },
},
defaults = {
+14 -14
View File
@@ -1,16 +1,16 @@
return {
-- https://github.com/numToStr/Comment.nvim
{
"numToStr/Comment.nvim",
event = "VeryLazy",
require("nvim-treesitter.configs").setup({
context_commentstring = {
enable = true,
enable_autocmd = false,
},
}),
config = function()
require("Comment").setup()
end,
},
-- https://github.com/numToStr/Comment.nvim
{
"numToStr/Comment.nvim",
event = "VeryLazy",
-- require("nvim-treesitter.configs").setup({
-- context_commentstring = {
-- enable = true,
-- enable_autocmd = false,
-- },
-- }),
config = function()
require("Comment").setup()
end,
},
}
@@ -0,0 +1,10 @@
return {
--https://github.com/VidocqH/data-viewer.nvim
{
"vidocqh/data-viewer.nvim",
opts = {},
dependencies = {
-- "kkharji/sqlite.lua", -- Optional, sqlite support
},
},
}