Select content in a div with only css

.selectable {
    -webkit-touch-callout: all; /* iOS Safari */
    -webkit-user-select: all; /* Safari */
    -khtml-user-select: all; /* Konqueror HTML */
    -moz-user-select: all; /* Firefox */
    -ms-user-select: all; /* Internet Explorer/Edge */
    user-select: all; /* Chrome and Opera */
    border-bottom-width: 1px;
    border-bottom-style: dashed;
    border-bottom-color: chocolate;
    cursor: pointer;
    display: inline-block;

Just by adding that CSS and adding the class selectable to your HTML element will highlight all the inner HTML. Then the user can press ctrl+c to copy the text without needing to highlight everything. This has a very nice effect on your mobile devices. It will highlight everything on your phone which is very convenient

Keyboard and mouse

New keyboard and mouse

After something like 8 years I finally bought a new keyboard and mouse. My other ones were on the way out. I did some shopping around and found the world of mechanical keyboards and gaming mice. 

There are so many things to look for and consider for mechanical keyboards. Do I go with led keys, which color switches should I buy, and do I want textured keys, how much is the right amount of money to spend on a keyboard they can get pretty expensive. I looked around for a while and found a corsair k68 keyboard. It can be overwhelming.

What did I choose

For my mouse I choose a logitech G502 hero (around 47 dollars) and my keyboard I selected the corsair k68 (around 73 dollars)


Keyboard – I did a lot of research by watching reviews on youtube and I read a lot. For me I don’t need a loud keyboard and I need the light easy to press key with a short travel distance without bottoming out. I like to type fast without pressing very hard on the keys.

Mouse – I like macros and shortcut keys. The G502 hero has 11 buttons and you can change the pointer sensitivity right on the mouse. for the price I’m very happy with my purchase.


if you search for ‘ or ” and it breaks your software

Chances are if you are using a database and your application errors out when you enter ‘ or ” into a field and you get an error this usually means your prone to SQL injection. While SQL injection is very dangerous it’s relatively simple to resolve. Now I say its simple but it could mean lots of re-work for you.

I don’t want to talk about how to prevent and cure SQL injection. But, I want to show a solution to this problem. There are already so many great resources out there on how to resolve this issue.

Really the best quick thing you can do is escape all ” and ‘. PHP has a lot of really useful commands to carry out this like mysql_real_escape_string(deprecated) But, probably the biggest thing that can be done is to use PDO(PHP Data Objects).


This sample query

$sql = <<<SQL
SELECT * FROM users WHERE = ‘123’;

would turn into something like this

$sql = <<<SQL
SELECT * FROM users WHERE = :user_id
$sth = $dbh->prepare($sql);
$sth->execute([‘:user_id’ => ‘1234’]);
$results = $stmt->fetchAll(PDO::FETCH_ASSOC)


Some useful links:


testing emails

Safe Email Testing Solution

As developers or project staff it’s really hard to come up with a clean and safe email testing solution. You never want to send production emails but, really how do you test them.

I’ve recently found this service You just add the email settings in your application however you usually would and all emails generated by your system will just display in your dashboard inside mail trap. Please feel free to check out this amazing service



Htop is super easy to use

Linux top is very useful in seeing system processes. The only problem is the general layout and commands are not obvious while its open. For those reasons, I like htop (htop – interactive process viewer). It lists many options on the bottom of the screen and you can press the letter h to get more detailed information. Once in the application, you can press f5 to activate tree view or you can press the period key to change the sorting column. I also use the f4 key a lot to activate the search functionality. HTop is definitely a must-have application


In a Debian based Linux distro like Ubuntu, Gnome, Kubuntu and plenty more just run this comment below which will install it because htop is not installed by default.

sudo apt install htop -y;


Some resources: