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
πŸ–₯ 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
πŸŽ› Fix SSH Error πŸˆ‚οΈ

Error:
Warning: remote port forwarding failed for listen port 3002


Solution:
# lsof -i :3002
kill $(lsof -t -i :3002)


alias port='lsof -i '
# Usage port :3002


#ssh #error #port #forwarding #portforwarding #remote #server
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
πŸ”₯1πŸ‘1😁1
πŸ“± Reinstall Firefox for Selenium. From snap to apt 🐍🐧

Mozilla

#selenium #apt #snap #apt
Please open Telegram to view this post
VIEW IN TELEGRAM
🦊 Template Repository with Dynamic Debug for Parse any Site Data With Python & Selenium πŸ–₯

https://github.com/makhnanov/python-selenium-parser-template

#parser #parse #selenium #debug #firefox #python
Please open Telegram to view this post
VIEW IN TELEGRAM
Ubuntu & Chrome Clear DNS Cache

sudo systemctl restart systemd-resolved
sudo systemctl restart dnsmasq


chrome://net-internals/#dns
chrome://net-internals/#sockets
πŸ”₯1
🐧 Drop System Log | No Space Left on Device πŸ₯³

Problem:
... no space left on device ...
ls -lAFh /var/log
-rw-r----- 1 syslog adm 42G Oct 22 14:06 syslog


Solution:
sudo rm /var/log/syslog

sudo systemctl restart rsyslog

or
echo > /var/log/syslog


#space #left #free #disk #syslog #memory #leak
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸŽ› Install Go 🐧

sudo apt install golang-go


Get version:
go version


Other:
sudo apt remove golang-go
sudo apt remove --auto-remove golang-go
wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.2.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc
go version


https://go.dev/dl/

#go #language
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘£ Go Hide Window From Task Bar πŸ–₯


Deps:
sudo apt-get install xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev


package main

import (
"fmt"
"github.com/BurntSushi/xgb"
"github.com/BurntSushi/xgb/xproto"
"github.com/go-gl/gl/v4.1-core/gl"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/go-vgo/robotgo"
hook "github.com/robotn/gohook"
"log"
"runtime"
)

func hideFromTaskbar(window *glfw.Window) {
xConn, err := xgb.NewConn()
if err != nil {
log.Fatalln("Can\\'t connect to X server:", err)
}
defer xConn.Close()

x11Window := window.GetX11Window()
root := xproto.Setup(xConn).DefaultScreen(xConn).Root

atomWmState, err := xproto.InternAtom(xConn, false, uint16(len("_NET_WM_STATE")), "_NET_WM_STATE").Reply()
if err != nil {
log.Fatalln("Can\\'t get _NET_WM_STATE:", err)
}

atomSkipTaskbar, err := xproto.InternAtom(xConn, false, uint16(len("_NET_WM_STATE_SKIP_TASKBAR")), "_NET_WM_STATE_SKIP_TASKBAR").Reply()
if err != nil {
log.Fatalln("Can\\'t get _NET_WM_STATE_SKIP_TASKBAR:", err)
}

changeState := xproto.ClientMessageEvent{
Format: 32,
Window: xproto.Window(x11Window),
Type: atomWmState.Atom,
Data: xproto.ClientMessageDataUnionData32New([]uint32{
1,
uint32(atomSkipTaskbar.Atom),
0,
0,
0,
}),
}

err = xproto.SendEventChecked(xConn, false, root, xproto.EventMaskSubstructureRedirect|xproto.EventMaskSubstructureNotify, string(changeState.Bytes())).Check()
if err != nil {
log.Fatalln("Can\\'t send event:", err)
}
}


#go #taskbar #system #window
Please open Telegram to view this post
VIEW IN TELEGRAM
Channel name was changed to «Smart 🧠 Fullstack»
🐧 sudo with no pass πŸŽ›

echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers


#sudo #passwd #pass #nopass #hole
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ€ͺ Great PDF Database for Many Languages β›ˆ

https://goalkicker.com/
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯2
Show Router Address

ip route show default


#ip #router #network
mkcd() {
mkdir -p "$1" && cd "$1"
}