This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
# PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' | |
PROMPT+=' %{$fg[cyan]%}%/%{$reset_color%} $(git_prompt_info)' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We identified 3 possible "common" causes: | |
1) If no user shows up at all, check for `greeter-hide-users=false` in `/etc/lightdm/lightdm.conf.d/*` , if missing create it. | |
See also: https://wiki.debian.org/LightDM#Enable_user_list | |
2) If only some of the users shows up, or step 1 is already correct. Check for MIN_UID/MAX_UID settings. | |
Most likely locations: | |
- /etc/lightdm/users.conf --> `minimum-uid` | |
- /etc/login.defs | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TL;DR; Force the use nfs4.0 (the issue arises with nfs > 4.1). | |
# Situation: | |
* NFS server with multiple IP. E.g. different subnets for different access levels and or bandwidth/MTU. | |
IPs | |
192.168.10.1 | |
192.168.20.1 | |
Exports: | |
/srv/nfs/lvl10 192.168.10.0/255.255.255.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
By default will wait on all the interfaces managed by `systemd-networkd` to come online and get fully configured. | |
All interfaces that appear in any file in `/etc/systemd/network` (and friends) are considered managed. | |
We can use `networkctl` to see the actual "configuration progress status". Any interface stuck on "configuring" is an issue. | |
While this is usually an indication of network problem, it may be a false positive, for example: | |
* Slave interfaces in a bond | |
* Slave interfaces in a bridge | |
Since these interfaces appear in the folders above but do not have any ip will never reach the state of "configured", | |
hence the service will halt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Symptoms: Port forwarding not working, machine not reachable from outside, strange public IP. | |
By default, many ISPs that use PPPoE for authentication do not automatically assign a public IPv4 (to save some..), | |
you may have to ask your ISP to assign one to you either static or dynamic. | |
By default, EdgeRouter does not setup the IP (if) provided by the ISP when connecting via PPPoE. | |
To use the IP, execute the following procedure: | |
- From the dashboard | |
Select "Actions" on the PPPoE interface | |
Then "config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows & WSL1 & WSL 2 SSH with gpg cards support | |
>> Windows & WSL1 | |
Based upon: | |
- https://www.antirandom.com/2020/03/ssh-on-windows-with-private-key-on-yubikey/ | |
- https://github.com/benpye/wsl-ssh-pageant | |
Requirements: | |
- [win] gpg4win |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/sysctl.d/wireguard.conf | |
net.ipv4.ip_forward=1 | |
net.ipv6.conf.all.forwarding=1 | |
net.ipv6.conf.default.forwarding=1 | |
net.ipv6.conf.eth0.proxy_ndp=1 | |
#/etc/wireguard/wg0.conf (DO virtual machine) | |
[Interface] | |
# The server interface does not actually need an ipv6. | |
# The 2 following must be repeated for each used addres [0, 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hide users: | |
sudo vim /var/lib/AccountsService/users/<username> | |
``` | |
[User] | |
SystemAccount=true | |
``` | |
Install scanner (default lib is too old and buggy) | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/udev/rules.d/85-yubikey.rules | |
# https://stackoverflow.com/questions/13699241/passing-arguments-to-shell-script-from-udev-rules-file#14982520 | |
# https://askubuntu.com/questions/635266/use-of-yubikey-neo-for-login-2fa-and-lock-screen#635267 | |
# Bus 001 Device 012: ID 1050:0407 Yubico.com | |
ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", RUN+="/usr/local/bin/yubikey_lock.sh '%E{ID_SERIAL}' '%E{ID_MODEL_ID}'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# matrix.rb | |
# MB version (heavily broken) | |
# class MatrixArgumentError < ArgumentError; end | |
# class MatrixRuntimeError < RuntimeError; end | |
class Matrix |
NewerOlder