Toggle CSS on scroll

Tell at what pixel from the top the CSS should be triggered, in this example i’m targeting the navbar with id=”topnav”. You also need JQuery for this to work.

Customize WordPress Login CSS

I Wrote a plugin that attaches a hook to the login page and adds custom CSS. The plugin can be administered from your admin menu “Settings/ASBRA Login Plugin”. Simply add your CSS rules and click the “Save Changes” button.

I’m not a robot

Google has a nifty way of checking if you’re human or not. I wrote a PHP Class for verifying ReCaptcha v.2.

Securing WordPress with .htaccess

Leaving your wp-login.php script or wp-admin folder accessible from the internet allows for bruteforcing of your passwords My way of solving this is by creating a randomly named folder e.g. “asbra” with som php code that sets a cookie which is required by the .htaccess file.

Sending Email from Chroot Environment

So you dont want to install the Sendmail daemon in every Chroot environment to be able to use the PHP mail() function? Of course not.. the simple solution is called mini_sendmail, it connects to localhost on port 25 to deliver the emails.

Categorized as PHP

Leverage browser caching

If you’ve ever tried the Google Developers Audit or the Pingdom Speed test on your website then you’ve probably seen the warning about “Leverage browser caching“, it basicly means that the site tells the browser to keep some of the files cached for faster page loading. You can do this with your local .htaccess file:

TLS v1.1 is being phased out by 30 June 2018

Apache supports lots of different encryption protocols, some of which have serious vulnerabilities that puts sites at risk of being breached. The Poodle and Beast exploits are just a couple examples of how attackers have taken advantage of weaknesses in SSL and TLS to compromise organizations.