Latest comments:

2023-11-18 17:49
@Anonymous I can confirm that it works. I use it on my own Postfix server, and have successfully blocked numerous of spammers by using this method. However, you may need to enable the pcre extension and use regular expressions to block certain things. The article is now updated to better reflect this.
2023-09-20 08:09
I have this in my .htaccess to block countries

MaxMindDBEnable On
MaxMindDBFile DB /usr/local/share/GeoIP/GeoIP2-Country.mmdb
MaxMindDBEnv MM_COUNTRY_CODE DB/country/iso_code

SetEnvIf MM_COUNTRY_CODE ^(RU|DE|FR) BlockCountry
Deny from env=BlockCountry

That works well......

But how to allow only one country ?

Tried
Allow from eny=BlockCountry
but nogo yet....

Chrs..
Michael Petrovich: Nested Functions in PHP
2023-06-02 02:57
Within a function, you can define a variable to be a function. Variables are local.

function MyFunction($y)
{
$mysubfunction = function($x)
{
return $x + 10;
};

$y = $mysubfunction($y);
echo $y;
}

MyFunction(12);
2023-04-15 17:23
I have a GUI application that needs to handle more advanced events from the keyboard, so using <linux/input.h> is best, but this requires root access, on cases like this what is the recommended approach? the GUI app is continuously listening to the keyboard events, so it's not a one-time operation like a file edit, how can this be approached?
2023-03-03 17:58
Thanks a lot! But one question - how to compile administration-js on production? When I make changes on production in this file - this error message appears again.
For developer-version it works after ./psh.phar administration:build but production-version doesn't have psh.phar.
2023-02-20 13:50
I tried ccd2iso on a bin/cue set and it created a 49MB iso file and 22 .cdr files which I am assuming are supposed to be tracks?

I must be missing data somewhere...
2022-12-27 12:32
Thanks Jacob. I bought a Rapoo mouse MT750s and noticed the scroll is unreliable. First I messed a lot with the mouse settings. No change.
I noticed it does the same on an Android tablet (I bought this model because it offers USB + BT connectivity) so clearly not software related.
I wanted to return it as it's in warranty but 1. somehow I managed to lose the box and the warranty papers 2. knowing the store policies, their answer after 2 weeks would have been "look, it works, what do you want" in a polite matter.
I used your method. It worked! trial and error though and it's not 100% perfect but I don't want to try today anymore. For the moment sometimes the middle click is not registered and the wheel gets stuck. Need to find the correct size for the paper. It has 6 screws, 4 of them under the mouse feet - that do not glue back properly after removing/reattaching.
Bad product for it's price (45 dollars). I wanted another mouse with an internal battery and the BT + USB connection plus the horizontal wheel were tempting. I will avoid this manufacturer for the future.
2022-11-24 01:50
Well, it's kinda make sense. As far as I know on a hardware level there is no balance, but separate volumes for left and right channels. So to change volume you need appropriately change volume of both channels.

This is speculation (I have no experience in sound drivers whatsoever), but maybe some interrupts are missed or intentionally skipped from one channel if CPU is under load or something like that.

Back in the day there were similar reports describing problem with Windows 7 (https://www.sevenforums.com/sound-audio/356773-windows-system-volume-only-controls-left-channel.html). Only left channel was changing when changing volume with volume up/down buttons.
2022-11-05 19:22
Thank you for writing this and thank you to Martin for commenting where the change needed to be if using Lets Encrypt (which I am). I have been working relentlessly on this for hours, and, once I came across this post, problem solved!
Thanks again!
2022-10-13 01:57
And the below Redirect rule in your apache config file:
/etc/apache2/sites-available/xxxxx-ssl.conf

Redirect 301 /.well-known/carddav /remote.php/dav
Redirect 301 /.well-known/caldav /remote.php/dav
Redirect 301 /.well-known/webfinger /index.php/.well-known/webfinger
Redirect 301 /.well-known/nodeinfo /index.php/.well-known/nodeinfo
  1. How to access standard php $_GET parameters from the Shopware storefront .twig files. E.g. The URL query string parameters.
    Released: 2023-11-20 23:03
  2. The advance of AI is probably not going to end Blogging, but it will present challenges and force bloggers to rethink their online strategy, moving away from existing spammy SEO practices.
    Released: 2023-11-18 11:25
  3. Sometimes we may to manually clear cached Shopware files to fix namespace issues.
    Released: 2023-11-15 00:40
  4. The magnificent potato and formidable spud of unparalleled intellect. ROFL
    Released: 2023-11-13 19:28
  5. You need quite a few files just to create a scheduled task in Shopware, and getting it right can be a challenging undertaking to new developers. In this tutorial, I tried to simplify the process.
    Released: 2023-11-11 22:17
  6. Here is the reason why the Shopware build script may not progress beyond: Dumped plugin configuration.
    Released: 2023-11-04 10:16
  7. Is it possible to jump from the Earth to the Moon with ones own two legs? Let us ask ChatGPT what it thinks about that (Super funny response).
    Released: 2023-11-02 19:37
  8. You need to route ocm-provider requests to index.php to have the error go away. The error started showing after I upgraded my Nextcloud server some time ago, and I have not had time to fix it until now.
    Released: 2023-10-29 09:44
  9. ChatGPT is sometimes referring to me as *dear interlocutor*, mostly when giving it personal instructions, but nevertheless super funny!
    Released: 2023-10-29 08:59
  10. The best way to deal with a trailing question mark is probably just to make it a bad request, because it is a very odd thing to find in a request URL.
    Released: 2023-10-28 12:06
  11. The Video outside the viewport is properly not worth spending time on solving; it is probably intended to solve a specific issue, and every single little video probably does not need to get indexed anyway.
    Released: 2023-10-28 00:00
  12. When I walk down the street, is it advisable to kick and scream at the same time?
    Released: 2023-10-27 00:00

Currently Popular

Stand With Ukraine, banner

Russia's murderous attacks in Ukraine has shocked and outraged the world.

We know millions are now refugees, while thousands has been killed as a result of Russia's evil actions.

For ways to support ukraine, see here:

About Beamtic

Beamtic is a website dedicated to technical tutorials and articles on web development. The site is currently hosting articles on a variety of subjects, with a particular focus on technologies such as PHP, HTML, CSS, and JavaScript.

Every tutorial is actively maintained, so feel free to leave a comment if you find something that can be improved.