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

New keyboard and mouse

, ,
Keyboard and mouse

After approximately eight years, I finally purchased a new keyboard and mouse as my previous ones deteriorated. I conducted thorough research and discovered the realm of mechanical keyboards and gaming mice.

Regarding mechanical keyboards, the options and considerations are seemingly endless. There is a myriad of factors to ponder over before making a decision that suits your preferences and needs. One of the first things to contemplate is whether you desire LED keys or not. LED keys can add a touch of visual appeal to your keyboard, making it stand out and adding a touch of personalization to your gaming or typing experience. Moreover, LED keys also make it easier to locate specific keys in dimly lit environments, enhancing visibility and reducing the chances of making typing errors. However, the decision doesn’t end there. Once you’ve decided on LED keys, you’re faced with an array of color switches to choose from. Each color switch has its own unique characteristics and feel, catering to different typing or gaming styles. For instance, Cherry MX Red switches are known for their smooth linear feel, making them ideal for rapid and precise movements during gaming. On the other hand, Cherry MX Blue switches offer a tactile and audible feedback, perfect for those who enjoy the satisfying clickety-clack sound and a distinct tactile sensation with each keystroke. The selection of the right color switch is crucial as it directly affects the overall typing experience and can significantly impact your productivity or gaming performance. Textured keys are yet another aspect to contemplate. These keys feature a textured surface that provides enhanced grip and tactile feedback. They are particularly useful for gamers who require precise control and accuracy during intense gaming sessions. The added texture ensures key presses are registered accurately, reducing the chances of accidental keystrokes or misfires. Moreover, textured keys can also be beneficial for typing enthusiasts who prefer a unique and gratifying typing experience. The textured surface adds an extra layer of tactile satisfaction, making typing on the keyboard a delightful and engaging experience. Of course, price is always a crucial consideration when buying a mechanical keyboard. The right amount of money to spend on a keyboard can vary depending on individual preferences and budget constraints. Mechanical keyboards can range from budget-friendly options to high-end, premium models. It is important to strike a balance between quality, features, and cost to ensure you are getting the best value for your money. While some mechanical keyboards can indeed be quite expensive, it is essential to consider the long-term benefits and durability they offer, as they are designed to withstand heavy usage and provide a superior typing or gaming experience for years to come. Navigating through the vast array of mechanical keyboards available on the market can undoubtedly be overwhelming. However, after careful research and consideration, I stumbled upon the Corsair K68 keyboard. With its impressive durability, stunning LED backlighting, and wide range of Cherry MX switches to choose from, the Corsair K68 intrigued me. It boasts a robust construction that can withstand accidental spills and dust, providing peace of mind for those who enjoy their beverages while working or gaming. Additionally, the Corsair K68 offers dedicated multimedia controls, allowing seamless control over audio playback without interrupting your workflow or gameplay. In conclusion, the world of mechanical keyboards is a vibrant and dynamic one, offering a plethora of options to cater to everyone’s unique preferences. From LED keys to textured surfaces, the choices are endless. With careful consideration of factors such as switch color, textured keys, and budget, you can find the perfect mechanical keyboard that will elevate your typing or gaming experience to new heights. So, take your time, explore your options, and embark on a journey to discover the mechanical keyboard that resonates with you the most.

What did I choose

For my mouse, I chose a Logitech G502 Hero (around $47), and for my keyboard, I selected the Corsair K68 (around $73).

In my quest for the ideal keyboard, I have found that a quiet keyboard with light, easily pressed keys and a short travel distance is my preference. The soft whisper of the keys enhances my writing experience, while the effortless glide allows for speedy and precise typing. A shorter travel distance reduces strain and promotes comfort. It is through this meticulous selection process that I have discovered the keyboard that complements my typing style, enabling me to express myself with grace and efficiency effortlessly.

I absolutely adore macros and shortcut keys; they have become an integral part of my daily computing experience. They not only save me valuable time but also enhance my productivity. That’s why I was delighted when I discovered the G502 Hero, a gaming mouse that offers a stunning array of 11 programmable buttons. This remarkable feature allows me to customize my mouse to suit my specific needs, whether it’s for gaming or for streamlining my work processes. But that’s not all; the G502 Hero goes above and beyond by providing the ability to adjust pointer sensitivity directly on the mouse itself. This means that I can effortlessly fine-tune the mouse’s tracking speed to match my preferences without having to navigate through complex software settings. This feature has proven to be incredibly convenient, especially when I switch between different tasks that require varying levels of precision. In terms of satisfaction, I can confidently say that I am highly pleased with my purchase of the G502 Hero. The mouse not only meets but exceeds my expectations, considering its affordable price point. Its ergonomic design fits comfortably in my hand, ensuring that I can use it for extended periods without experiencing any discomfort or fatigue. The G502 Hero’s exceptional build quality, coupled with its precise and responsive tracking, further adds to its appeal. Whether I’m engaged in intense gaming sessions or tackling demanding work projects, the mouse effortlessly keeps up with my every move. Moreover, the G502 Hero is equipped with customizable RGB lighting, allowing me to personalize its appearance to match my style or mood. This feature adds a touch of flair to my workstation and enhances the overall aesthetic appeal. Additionally, the G502 Hero comes with onboard memory that enables me to save my preferred settings directly on the mouse. This means that I can seamlessly transition between different computers without having to reconfigure my macros and sensitivity settings every time. This convenience has proved to be a game-changer for me, as I frequently switch between my gaming rig and my work laptop. In conclusion, the G502 Hero has undoubtedly exceeded my expectations in terms of functionality, customization options, and overall user satisfaction. Its extensive button layout, pointer sensitivity adjustment, ergonomic design, build quality, and additional features make it a standout choice for both gaming enthusiasts and professionals seeking a versatile and reliable mouse. Considering its reasonable price point, it is an absolute steal and a worthwhile investment for anyone looking to elevate their computing experience to new heights.

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: