Categories
Interesting Laravel

Understanding lockForUpdate and sharedLock in Laravel

By Alex Renoki

Another source: https://laravel-news.com/managing-data-races-with-pessimistic-locking-in-laravel

Transactional databases are fast and reliable, but not all the time. When you want to have high transaction numbers, you sacrifice something important for speed. That something important is atomicity. And here’s a real-world example that’s way more straightforward than a game — a banking system.

Let’s consider we have a very poor banking system in the pre-crypto era where our customers can easily transact between them. We are not really experienced with ledgers, so we choose to go with MySQL or Postgres (yes, even Postgres might go back if we don’t use locking).

Categories
Interesting

Harvard CS50’s Artificial Intelligence with Python – Full University Course

https://www.youtube.com/watch?v=5NgNicANyqM&t=7s

Categories
Interesting

Algorithmic “filter bubbles”

Categories
For IT

Flatpak

List all Flatpak application

flatpak list

Removing multiple Flatpak application at once by:

flatpak uninstall --unused
or
flatpak uninstall --all
flatpak repair
Categories
For IT Guides for educators Guides for students

Software for a complete PC

Windows Based PC

Compression / decompression

7zip

Remote Desktop / assistance

anydesk

Codecs / Video playback

k-lite codec pack

Office Suite

Microsoft Office Suite


Categories
For IT

Debian 11: how to add a user to sudoers

Its pretty easy

su root

nano /etc/sudoers

At the end of the file, add the following line:

yourusername ALL=(ALL:ALL) ALL

Categories
For IT

Quick disk speed test

Open a CMD as administrator

type “winsat disk –drive c”

examples of winsat disk command
Categories
For IT Virtualmin

Blocking Email Spam with Postfix SMTP Server – Virtualmin

#Reject Email if SMTP Client Has no PTR record
#Reject Email if SMTP Client Hostname doesn’t have valid A Record
#Reject Email If MAIL FROM Domain Has Neither MX Record Nor A Record

smtpd_sender_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unknown_sender_domain
reject_unknown_reverse_client_hostname
reject_unknown_client_hostname

#Enable HELO/EHLO Hostname Restrictions in Postfix

smtpd_helo_required = yes
smtpd_helo_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_invalid_helo_hostname
reject_non_fqdn_helo_hostname
reject_unknown_helo_hostname

More on https://www.linuxbabe.com/mail-server/block-email-spam-postfix

Categories
AD debug

Check Exchange Server connection to AD

Error message: Active directory response: The LDAP server is unavailable.

  1. Check DNS configuration at network controller
  2. Run below command in command prompt
    netdom query fsmo
Categories
Guides for educators Guides for students

Google Chrome: How to disable automatic translation of websites

Google Chrome lets you automatically translate a webpage not written in your browser’s default language. Like most translation software, it can be a little unreliable.