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
โ›ˆ 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
๐Ÿ–ฅ Install PHP 8.3 on Debian 11 Bullseye Throw HTTP 451 Unavailable For Legal Reasons โ›ˆ

Solution: add proxy for apt:
echo 'Acquire::https::proxy "https://user:pass@x.x.x.x:8888/";' > /etc/apt/apt.conf


#php #debian #installation #bullseye #legal #code451
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿง Disable Auto Choose System In GRUB ๐ŸŽ›

sudo nano /etc/default/grub


GRUB_TIMEOUT=-1


sudo update-grub


#grub #bios #disable #timeout #windows #linux
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ–ฅ Let's Test Your Code โ›ˆ

composer require "codeception/codeception" --dev

php vendor/bin/codecept bootstrap --no-interaction

src/tests/Functional.suite.yml
actor: FunctionalTester
modules:
enabled:
- Laravel:
step_decorators: ~

composer require codeception/module-laravel --dev

vendor/bin/codecept g:test Functional First

vendor/bin/codecept run Functional


#test #codecept #codeception #php #composer
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ–ฅ Let's Test With Pest =) โ›ˆ

composer remove phpunit/phpunit
composer require pestphp/pest --dev --with-all-dependencies
vendor/bin/pest --init
vendor/bin/pest


Doc

#test #pest #php #composer
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿฃ Postman => Insomnia โ„น๏ธ
Please open Telegram to view this post
VIEW IN TELEGRAM
โ„น๏ธ Insomnia Pre-request Script for Get Access Token and Past it into Header

const resp = await new Promise((resolve, reject) => {
insomnia.sendRequest(
'http://localhost/api/get-access-token',
(err, resp) => {
if (err != null) {
reject(err)
return
}
insomnia.request.addHeader({
key: 'Authorization',
value: 'Bearer ' + resp.json().access_token
});
resolve(resp);
}
);
});


#insomnia #test #script #prerequest
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘3
๐ŸŒช๐Ÿ“ฑ Cyberpunk 2077 HTML by Hussard

Pen 1
Pen 2

#cyberpunk #pen #codepen
Please open Telegram to view this post
VIEW IN TELEGRAM
โค2
โ›ˆ Get Vendor Dir From Any File ๐Ÿ–ฅ

$loaders = \Composer\Autoload\ClassLoader::getRegisteredLoaders();
$keys = array_keys($loaders);
if (count($keys) !== 1) {
throw new \Exception('Cant detect vendor dir!');
}
echo $keys[0];


#vendor #php #composer
Please open Telegram to view this post
VIEW IN TELEGRAM
โค2
๐ŸŒช CSS Games ๐Ÿ–ฅ

1๏ธโƒฃ CSS Diner (Selectors)
2๏ธโƒฃ Flexbox Froggy (Flex)
3๏ธโƒฃ CSS Battle (Repeat)

โ›ˆ Backend Games

1๏ธโƒฃ PHP Return true

#css #game #games #noob
Please open Telegram to view this post
VIEW IN TELEGRAM
โค2
๐Ÿ–ฅ Lets Encrypt Free SSL Certificate ๐ŸŽ›

apt update && apt upgrade
apt install certbot python3-certbot-nginx
certbot --nginx
# choose your nginx.server
certbot certificates
systemctl status certbot.timer
cat /etc/cron.d/certbot
certbot renew --dry-run
nginx -t
service nginx restart
# keep calm & stay safe


#ssl #nginx #https #port443 #certbot #encrypt #tls #secure
Please open Telegram to view this post
VIEW IN TELEGRAM
โค2
๐ŸŒช Laravel CORS โ›ˆ

If you are having trouble authenticating with your application from an SPA that executes on a separate subdomain, you have likely misconfigured your CORS (Cross-Origin Resource Sharing) or session cookie settings.

The config/cors.php configuration file is not published by default. If you need to customize Laravel's CORS options, you should publish the complete cors configuration file using the config:publish Artisan command:


php artisan config:publish cors


Read more on laravel.com

#laravel #cors #php #config #artisan
Please open Telegram to view this post
VIEW IN TELEGRAM
โค2
๐Ÿ“ฑ ChatGPT o1-preview & o1-mini ๐Ÿง 

๐Ÿ‡ท๐Ÿ‡บ [RU] Review
๐Ÿ‡บ๐Ÿ‡ธ [EN] Review

#chatgpt #ai
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ”ฅ1