echo $USER ALL=NOPASSWD: ALL | sudo tee /etc/sudoers.d/$USER
LANG=C xdg-user-dirs-gtk-update
printf 'Port 22\nPort 50022\n' | sudo tee /etc/ssh/sshd_config.d/90-port-50022.conf && sudo systemctl restart ssh
2-comment # %title%%newline%# %url%%newline% 2-lines %title%%newline%%url%%newline% 1-line %title% %url%%newline% pukiwiki [[%title%>%url%]]%newline% Title %title%%newline% 2-semiColon ; %title%%newline%; %url%%newline% 2-apos ' %title%%newline%' %url%%newline%
参考:
Create Link - Chrome ウェブストア
custom key mapping (simple is best)
unmapALL
map <c-up> removeTab
map <c-down> Vomnibar.activate
map <c-left> goBack
map <c-right> goForward
if [ -d /etc/chrony/sources.d ]; then
conf=/etc/chrony/sources.d/japan.sources
else
conf=/etc/chrony/chrony.conf
fi
sudo tee -a "$conf" <<'...'
server ntp.nict.jp iburst
server ntp.jst.mfeed.ad.jp iburst
server ntp.ring.gr.jp iburst
...
sudo systemctl restart chrony
sleep 5
chronyc sources
2つやる
Ubuntu server 20.04, Debian など
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
sudo tee -a /etc/systemd/logind.conf <<...
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
...
sudo systemctl restart systemd-logind
AntiX
# /etc/elogind/logind.conf
HandleLidSwitch=ignore
systemd で電源管理をしているもの(Arch Linux, etc.)
# /etc/systemd/logind.conf
HandleLidSwitch=ignore
sudo systemctl set-default multi-user
sudo reboot
conf_user="$HOME/.config/containers/registries.conf"
[ -d "${conf_user%/*}" ] || mkdir -p "${conf_user%/*}"
cat <<'...' >"$conf_user"
unqualified-search-registries = ["docker.io"]
...
# シンプル版
PS1="${PS1%\\\$*}\\n\\$ "
# 既に改行が含まれているときは何もしない版
printf %s "$PS1" | grep -qF '\n' || PS1="${PS1%\\\$*}\\n\\$ "
ssh-keygen -t rsa -C "$(hostname -s)-$(date +%Y%m%d-%H%M)" -N '' -f ~/.ssh/id_rsa
New-NetFirewallRule -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
%LOCALAPPDATA%\_git-sdk-64\usr\bin\ssh.exe -fND 51080 -p 50022 -i %userprofile%\.ssh\id_rsa user@host
魴鮄のブログ - VirtualBoxのホストオンリーアダプタの設定方法が変わっていた
sudo tee /etc/vbox/networks.conf <<'...'
* 10.0.0.0/8 192.168.0.0/16 172.16.0.0/16
...
#11988 (Unable to turn off logging) – Oracle VM VirtualBox
for conf in /etc/environment /etc/default/virtualbox; do
sudo tee -a "$conf" <<'...'
VBOX_RELEASE_LOG_DEST=nofile
VBOXSVC_RELEASE_LOG_DEST=nofile
VBOX_GUI_SELECTORWINDOW_RELEASE_LOG_DEST=nofile
...
done