Skip to content

Instantly share code, notes, and snippets.

@leberblock
leberblock / tail-multiple.md
Last active September 12, 2024 13:21
tail multiple files in directory-tree

tail auf verschiedene Dateien innerhalb des Verzeichnisbaums

tail -f -n 1 */log/app.log
@leberblock
leberblock / brew-install-version-of-ansible
Last active September 3, 2024 12:25
brew install older version of ansible
### download core
```
brew tap --force homebrew/core
```
### ansible@7 open Formula and comment out "!disable-row"
```
brew edit ansible@7
```
### install ansible@7
```
@leberblock
leberblock / install-fonts.sh
Last active July 23, 2024 15:03
linux - install fonts via commandline
# create local fonts folder, if not existing
mkdir $HOME/.local/share/fonts
# copy desired font to fonts folder (wsl2-style)
cp /mnt/c/Users/pinkyanddabrain/Downloads/JetBrainsMono-2.304/fonts/ttf/* $HOME/.local/share/fonts/
# reset font cache
fc-cache -f $HOME/.local/share/fonts
# restart terminal - now you can choose the installed font e.g. in terminator
@leberblock
leberblock / lsof-deleted
Last active May 16, 2024 17:02
A process does not release deleted filespace.
lsof | grep '(deleted)'
# stop/kill corresponding service
@leberblock
leberblock / modprobe.conf
Created March 25, 2024 16:17
workaround fixing linux soundproblems with lenovo yoga c930
## /etc/modprobe.d/modprobe.conf
options snd_intel_dspcfg dsp_driver=2
## init 6
@leberblock
leberblock / aliases
Last active March 22, 2024 08:28
os - create global aliases
-> where to place?
/etc/profile.d/aliases.sh
-> ansible example
- name: Ensure aliases are present in /etc/profile.d/aliases.sh
lineinfile:
path: /etc/profile.d/aliases.sh
line: "{{ item }}"
loop:
- "alias sudi='sudo -i'"
@leberblock
leberblock / install docker and docker compose on centos7
Created February 11, 2020 13:16
install docker and docker-compose on centos7
## install docker
yum check-update
curl -fsSL https://get.docker.com/ | sh
systemctl start docker
systemctl status docker
systemctl enable docker
-> docker with non-root user
usermod -aG docker $(whoami)
@leberblock
leberblock / tastatur: falls obere zahlenreihe mal nicht funktionieren sollte
Created January 14, 2020 14:14
tastatur: falls obere zahlenreihe nicht funktionieren sollte
[Strg]+[Win]+[Alt] für ca. 5-10 Sekunden gedrückt halten. (bei Notebooks [Strg]+[Alt]+[Fn])
Das hat offenbar bei einigen Leuten gut funktioniert :)
siehe auch hier:
https://social.technet.microsoft.com/Forums/office/en-US/2f965e8a-d9d3-4c80-b0d7-c6560999ee4c/only-numerics-key-5-and-6-work-and-keyboard?forum=w7itprohardware
@leberblock
leberblock / git: set global user
Created December 16, 2019 16:24
git: set global user
git config --global user.email "email@example.com"
@leberblock
leberblock / shell: date command identify last 3 previous months
Created September 17, 2019 14:02
shell: date command identify last 3 previous months
#!/bin/bash
set -x
echo "[$(date "+%Y-%m-%d %H:%M:%S")] started ..."
# set date
month=$(date +"%-m")
month_prev=$((month - 3))
month_end=$month
month_start=$(date -d "$(date +%Y-%m-1) -3 month" +%-m)