This media is not supported in the widget
VIEW IN TELEGRAM
Forwarded from Laravel World
Laravel немного ускоряется при переходе с PHP 8.1 на 8.2. А с PHP 8.3 вы получаете еще плюс 38% производительности.
https://kinsta.com/blog/php-benchmarks/
https://kinsta.com/blog/php-benchmarks/
🐳1
Please open Telegram to view this post
VIEW IN TELEGRAM
Host: Xubuntu 23.10 (mantic)
# id
uid=1000(roman) gid=1000(roman) ...
Docker Container: Debian 12 (bookworm)
PhpDockerfile:
FROM php:8.3-fpm
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
RUN apt-get update && apt-get install sudo
RUN groupadd -g 1000 mygroup && \
useradd -u 1000 -g 1000 -m roman && \
echo "roman:root" | chpasswd && \
usermod -aG sudo roman
# Other RUN instructions ...
USER roman
#docker #fix #php #dockerfile #chmod #sponsor
💎 Sponsored
Please open Telegram to view this post
VIEW IN TELEGRAM
Linux Nano Hotkeys:
For next occurrence just Ctrl + W and Enter
#bash #nano #linux
Ctrl + Delete ➡️ Drop Next WordAlt + Backspace ➡️ Drop Previous WordCtrl + L ➡️ Refresh ScreenCtrl + K ➡️ Drop Current LineShift + Arrows ➡️ Select Text Ctrl + K ➡️ Cut SelectedCtrl + U ➡️ PasteCtrl + 6 ➡️ Set MarkShift + Arrows ➡️ Select TextAlt + 6 ➡️ Unset Mark / CopyCtrl + U ➡️ PasteAlt + 3 ➡️ CommentAlt + U ➡️ Ctrl + Z (Undo)Alt + E ➡️ RedoAlt + N ➡️ Show line numberCtrl + O / Ctrl + S ➡️ SaveCtrl + X ➡️ Save & ExitCtrl + W ➡️ Write text for search, then Enter.For next occurrence just Ctrl + W and Enter
#bash #nano #linux
#bash #linux #debian #root #sudo
How to ignore sudo in commands on server (if only root user exists):
Problem:
Before:
After:
Tested on Debian 11 (bullseye)
How to ignore sudo in commands on server (if only root user exists):
Problem:
root@mx1:~# sudo nano somefile.txt
-bash: sudo: command not found
nano /etc/bash.bashrc
Before:
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
function command_not_found_handle {
# check because c-n-f could've been removed in the meantime
if [ -x /usr/lib/command-not-found ]; then
/usr/lib/command-not-found -- "$1"
return $?
elif [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/share/command-not-found/command-not-found -- "$1"
return $?
else
printf "%s: command not found\n" "$1" >&2
return 127
fi
}
fi
After:
function command_not_found_handle {
# check because c-n-f could've been removed in the meantime
if [ -x /usr/lib/command-not-found ]; then
/usr/lib/command-not-found -- "$1"
return $?
elif [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/share/command-not-found/command-not-found -- "$1"
return $?
else
if [ "$EUID" -eq 0 ] && [[ $1 == sudo* ]]; then
full_command="$0 $@"
drop_sudo="${full_command#-}"
drop_sudo="${drop_sudo#bash}"
drop_sudo="${drop_sudo# }"
drop_sudo="${drop_sudo#sudo}"
drop_sudo="${drop_sudo# }"
bash -c "$drop_sudo"
return $?
else
printf "%s: command not found\n" "$1" >&2
fi
return 127
fi
}Tested on Debian 11 (bullseye)