Smart ๐Ÿง  Fullstack
45 subscribers
168 photos
11 videos
13 files
153 links
About channel: everyday developer hints.

for (๐Ÿ’ฒCoders as ๐Ÿ’ฒStudent):
echo("Hello ๐Ÿ’ฒStudent->name");
endfor;

Author: @BakirovRoman
Download Telegram
๐Ÿ–ฅ Common Bash History With Host Inside Docker Container ๐ŸŽ›๐Ÿง

docker-compose.yml

        volumes:
- "~/.bash_history:/home/${HOST_USER_NAME}/.bash_history"


#docker #docker_compose #bash #history #bash_history
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ–ฅ PHP Cli JSON Pretty View โ›ˆ

composer require makhnanov/php-json-pretty-view

json_pretty($data);


๐Ÿ–ฅ Github

#php #json #pretty #json_pretty #color #cli
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ŸŽ› Bash JPEG to PNG Converter ๐Ÿง

sudo apt install imagemagick

mogrify -format png image-for-convert.jpg


#imagemagick #imagick #bash #converter #convert #image #jpeg #jpg #png
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ–ฅ Docker Fast Run PHP Container ๐Ÿ–ฅโ›ˆ

Interactive bash:
docker run -ti php:8.3-cli bash


Just Test Code:
docker run --rm php:8.3-cli bash -c 'php -r "var_dump(match (true) { true => false } );"'


#bash #docker #php #cli
Please open Telegram to view this post
VIEW IN TELEGRAM
There are 10 kinds of people, those who understand binary and those who donโ€™t.

#joke
๐Ÿ˜2
๐ŸŽต Ffmpeg Replace Audio in Video ๐ŸŽง

ffmpeg -i source.mp4 -i new_audio.mp3 -map 0:v -map 1:a -c:v copy -shortest output.mp4


#ffmpeg #audio #video #mp3 #mp4
๐Ÿ”ฅ2
๐Ÿ–ฅ Docker Remove All Networks ๐ŸŽ›

docker network prune -f

alias docker-remove-networks="docker network prune -f"


#docker #network #remove #purne #net
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ–ฅ Laravel Nginx Default Config ๐Ÿ–ฅ

server {
listen 80;
listen [::]:80;
server_name example.com;
root /srv/example.com/public;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";

index index.php;

charset utf-8;

location / {
try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

error_page 404 /index.php;

location ~ \.php$ {
# fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_pass php:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_hide_header X-Powered-By;
}

location ~ /\.(?!well-known).* {
deny all;
}
}


#nginx #laravel #php #config #default #server
Please open Telegram to view this post
VIEW IN TELEGRAM
โ›ˆ Change PHP FPM port Inside Docker Container ๐Ÿ–ฅ๐Ÿ–ฅ

RUN sed -i 's/9000/9001/' /usr/local/etc/php-fpm.d/zz-docker.conf


#php #fpm #docker #port
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ŸŒช JS Max Int ๐Ÿ“ฑ

Number.MAX_SAFE_INTEGER; // 9_007_199_254_740_991


#js #max #int #javascript
Please open Telegram to view this post
VIEW IN TELEGRAM
โ›ˆ Composer Bash Completion ๐Ÿ–ฅ

sudo su

composer completion >> /etc/bash.bashrc


#composer #php #bash #completion
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿง Get Program Execution Time ๐ŸŽ›

time sleep 5


Output:
real  0m5.005s
user 0m0.000s
sys 0m0.002s


#bash #time #sleep #execution
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ–ฅ highlight.js ๐Ÿ–ฅ

๐ŸŒ Site / Github ๐Ÿ–ฅ
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿคฎ2
โ›ˆ JetBrains Toolbox Design Update ๐ŸŒช

#JetBrains #toolbox #design #update
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ŸŽ› Bash Show CPU Info ๐Ÿง

lscpu


#bash #cpu #info
Please open Telegram to view this post
VIEW IN TELEGRAM
Get Mouse Position

alias mouse='xdotool getmouselocation'


#mouse
๐ŸŽ› Debian remove bad sources ๐Ÿ–ฅ

Hit:1 http://ftp.nl.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Hit:3 http://ftp.nl.debian.org/debian bullseye-updates InRelease
Hit:4 https://download.docker.com/linux/debian bullseye InRelease
=> Ign:5 http://ppa.launchpad.net/ondrej/php/ubuntu oracular InRelease
Hit:6 https://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease
=> Err:7 http://ppa.launchpad.net/ondrej/php/ubuntu oracular Release
404 Not Found [IP: *.*.*.* 80]
=> Err:8 https://packages.sury.org/php bullseye InRelease
451 [IP: *.*.*.* 443]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu oracular Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://packages.sury.org/php/dists/bullseye/InRelease 451 [IP: *.*.*.* 443]
E: The repository 'https://packages.sury.org/php bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Solution:
apt update
mc /etc/apt/sources.list.d
# drop useless
# repeat


#troubleshooting #packages #sources
Please open Telegram to view this post
VIEW IN TELEGRAM