mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added pre-commit hooks
This commit is contained in:
14
.pre-commit-config.yaml
Normal file
14
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.2.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
args:
|
||||
- --markdown-linebreak-ext=md # ignore markdown's line break
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
@@ -163,7 +163,7 @@ ping -c 3 github.com
|
||||
lsblk
|
||||
|
||||
# create 2 partitions:
|
||||
# partition 1:
|
||||
# partition 1:
|
||||
# - EFI
|
||||
# - size 512 MiB
|
||||
# - hex code ef00
|
||||
@@ -400,7 +400,7 @@ sudo modprobe btusb
|
||||
sudo systemctl start bluetooth.service
|
||||
sudo systemctl enable bluetooth.service
|
||||
|
||||
# auto enable Bluetooth
|
||||
# auto enable Bluetooth
|
||||
# change AutoEnable to true in the [Policy] section:
|
||||
#
|
||||
#SET AutoEnable=True
|
||||
@@ -424,7 +424,7 @@ cd yay
|
||||
makepkg -si
|
||||
|
||||
# install fonts
|
||||
sudo pacman -S adobe-source-code-pro-fonts adobe-source-han-sans-cn-fonts adobe-source-han-sans-jp-fonts adobe-source-han-sans-kr-fonts adobe-source-han-sans-otc-fonts adobe-source-han-sans-tw-fonts adobe-source-sans-pro-fonts noto-fonts-emoji otf-ipafont ttf-dejavu ttf-hanazono ttf-inconsolata ttf-liberation ttf-roboto ttf-ubuntu-font-family
|
||||
sudo pacman -S adobe-source-code-pro-fonts adobe-source-han-sans-cn-fonts adobe-source-han-sans-jp-fonts adobe-source-han-sans-kr-fonts adobe-source-han-sans-otc-fonts adobe-source-han-sans-tw-fonts adobe-source-sans-pro-fonts noto-fonts-emoji otf-ipafont ttf-dejavu ttf-hanazono ttf-inconsolata ttf-liberation ttf-roboto ttf-ubuntu-font-family
|
||||
yay -S ttf-google-fonts-git ttf-ms-fonts
|
||||
|
||||
# install some more QOL utilities
|
||||
@@ -435,10 +435,10 @@ yay -S etcher-bin brave-bin spotify skypeforlinux-stable-bin timeshift
|
||||
# create a script with the following content:
|
||||
#
|
||||
# #!/bin/sh
|
||||
#
|
||||
#
|
||||
# APPLICATION_PATH="/usr/share/applications"
|
||||
# USER_APPLICATION_PATH="${HOME}/.local/share/applications"
|
||||
#
|
||||
#
|
||||
# for FILE in cat $1; do
|
||||
# if [ -e "${APPLICATION_PATH}/${FILE}" ]; then
|
||||
# echo "Creating file ${USER_APPLICATION_PATH}/${FILE}"
|
||||
@@ -447,7 +447,7 @@ yay -S etcher-bin brave-bin spotify skypeforlinux-stable-bin timeshift
|
||||
# echo "Deleting unnecessary file ${USER_APPLICATION_PATH}/${FILE}"
|
||||
# rm "${USER_APPLICATION_PATH}/${FILE}"
|
||||
# fi
|
||||
# done
|
||||
# done
|
||||
#
|
||||
vim ~/hide_desktop_icons.sh
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@ cp --backup /usr/share/oh-my-zsh/zshrc ~/.zshrc
|
||||
sed -Ei 's/#*\s*(ZSH_THEME)=.*/\1="refined"/' ~/.zshrc
|
||||
sed -Ei 's/#*\s*(COMPLETION_WAITING_DOTS)=.*/\1="true"/' ~/.zshrc
|
||||
sed -Ei 's/#*\s*(HIST_STAMPS)=.*/\1="yyyy-mm-dd"/' ~/.zshrc
|
||||
# set plugins=() to (git minikube terraform)
|
||||
# set plugins=() to (git minikube terraform)
|
||||
|
||||
@@ -8,11 +8,11 @@ sudo gpasswd -a pi salt
|
||||
passwd
|
||||
sudo hostnamectl set-hostname pi4.lan
|
||||
sudo vim.tiny /etc/salt/minion.d/master.conf
|
||||
sudo rm /etc/salt/minion_id
|
||||
sudo rm /etc/salt/minion_id
|
||||
sudo shutdown -r now
|
||||
sudo salt-key --list all
|
||||
sudo timedatectl set-timezone Europe/Dublin
|
||||
sudo timedatectl status
|
||||
sudo timedatectl status
|
||||
sudo salt-key --list all
|
||||
sudo salt-key --accept pi4.lan
|
||||
sudo systemctl enable --now ssh.service
|
||||
@@ -25,12 +25,12 @@ mkdir -p docker/boinc-client docker/pi-hole docker/nextcloud
|
||||
cd docker/boinc-client
|
||||
vim.tiny docker-compose.yml
|
||||
docker-compose up -d
|
||||
docker-compose logs --follow
|
||||
docker-compose logs --follow
|
||||
cd ../pi-hole
|
||||
vim.tiny docker-compose.yml
|
||||
vim.tiny docker-compose.yml
|
||||
docker-compose up -d
|
||||
docker-compose logs -f
|
||||
sudo vim.tiny /etc/locale.gen
|
||||
sudo locale-gen
|
||||
sudo locale-gen
|
||||
sudo localectl set-locale LANG=en_IE.utf8 LANGUAGE=en_IE.utf8
|
||||
mkdir -p repositories/private
|
||||
|
||||
@@ -373,7 +373,7 @@ Just save the output from `git diff` to get a patch file:
|
||||
git diff > file.patch
|
||||
|
||||
# Staged files only.
|
||||
git diff --output file.patch --cached
|
||||
git diff --output file.patch --cached
|
||||
```
|
||||
|
||||
The output from `git diff` just shows changes to **text** files by default, no metadata or other information about commits or branches.
|
||||
|
||||
@@ -37,9 +37,9 @@ find . -type f -print0 | xargs -0 -n 1 -P $(nproc) grep 'pattern'
|
||||
For simple searches, you might want to use [pdfgrep].
|
||||
|
||||
Should you need more advanced grep capabilities not incorporated by pdfgrep, you might want to convert the file to text and search there.
|
||||
You can to this using [`pdftotext`](pdfgrep.md) as shown in this example ([source][stackoverflow answer about how to search contents of multiple pdf files]):
|
||||
You can to this using [pdftotext](pdfgrep.md) as shown in this example ([source][stackoverflow answer about how to search contents of multiple pdf files]):
|
||||
|
||||
```sh
|
||||
```shell
|
||||
find /path -name '*.pdf' -exec sh -c 'pdftotext "{}" - | grep --with-filename --label="{}" --color "your pattern"' ';'
|
||||
```
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# `jdupes`
|
||||
# Jdupes
|
||||
|
||||
## TL;DR
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Mac OS X <!-- omit in toc -->
|
||||
# Mac OS X <!-- omit in toc -->
|
||||
|
||||
- [TL;DR](#tldr)
|
||||
- [Xcode CLI tools](#xcode-cli-tools)
|
||||
|
||||
@@ -8,7 +8,7 @@ Creates a unique temporary file or directory and returns the absolute path to it
|
||||
# create an empty temporary file
|
||||
mktemp
|
||||
|
||||
# create an empty temporary directory
|
||||
# create an empty temporary directory
|
||||
mktemp -d
|
||||
|
||||
# create an empty temporary file or directory with a random templated name
|
||||
|
||||
@@ -31,7 +31,7 @@ opkg info python3-dns
|
||||
# list packages providing a file
|
||||
opkg search /usr/bin/vim
|
||||
|
||||
# list user modified configuration files
|
||||
# list user modified configuration files
|
||||
opkg list-changed-conffiles
|
||||
|
||||
# list dependencies of a package
|
||||
|
||||
1
knowledge base/pdfgrep.md
Normal file
1
knowledge base/pdfgrep.md
Normal file
@@ -0,0 +1 @@
|
||||
# PDFGrep
|
||||
@@ -6,7 +6,7 @@
|
||||
# create main branch locally, taking the history from master
|
||||
git branch --move master main
|
||||
|
||||
# push the new local main branch to the remote repo (GitHub)
|
||||
# push the new local main branch to the remote repo (GitHub)
|
||||
git push --set-upstream origin main
|
||||
|
||||
# switch the current HEAD to the main branch
|
||||
|
||||
Reference in New Issue
Block a user