Posted on June 22, 2020June 26, 2020Categories Blog, Programming, quick notesTags ,   Leave a comment on Select content in a div with only css

Select content in a div with only css

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

Posted on April 13, 2018April 10, 2018Categories Mysql, PHP, Quick InfoTags ,   Leave a comment on if you search for ‘ or ” and it breaks your software

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 … Continue reading “if you search for ‘ or ” and it breaks your software”

Posted on March 12, 2018March 5, 2018Categories Programming, Quick Info, TechnologyTags , , , , ,   Leave a comment on testing emails

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 https://mailtrap.io/. 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 https://mailtrap.io/billing/plans

Posted on February 8, 2018February 8, 2018Categories Wordpress PluginsTags , , , , , , , , ,   Leave a comment on Code View

Code View

[av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”] Code View Visualize code on your blog using highlightjs and hightlightjs-line-numbers. [av_dropcap1]C[/av_dropcap1]odeView a simple WordPress plugin to carry out highlightjs and usage of all the themes that highlightjs offers. In the plugins settings page in Settings -> CodeView Settings you can choose the theme, add numbering, and line numbers. In your blog post just use the shortcode cv. For example [/av_textblock] [av_toggle_container initial=’0′ mode=’accordion’ sort=” styling=’av-minimal-toggle’ colors=” font_color=” background_color=” border_color=”] [av_toggle title=’Usable themes are’ tags=”] AGATE … Continue reading “Code View”

Posted on February 1, 2018February 8, 2018Categories PHPTags , ,   Leave a comment on Implement dependency injection

Implement dependency injection

Quick notes on implementing dependency injection   Most if not all PHP frameworks utilize dependency injection. Its allowing PHP to automate supplying function parameters. In my code example below in the class Test the function test requires the User class to be passed in as a parameter. Maybe you’ll want more things like Route or maybe some kind of Registry object. Having decency injection helps reduce redundant code by instantiating the function everywhere needed. Here is a VERY basic example of … Continue reading “Implement dependency injection”

Posted on January 24, 2018January 31, 2018Categories Blog, ProgrammingTags , ,   Leave a comment on Laravel route file cleanup

Laravel route file cleanup

[av_heading tag=’h3′ padding=’10’ heading=’Quick tip for laravel routes:’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading] [av_image src=’http://turtlebytes.com/wp-content/uploads/2018/01/Selection_005-1213×430.png’ attachment=’120′ attachment_size=’featured’ align=’center’ styling=” hover=’av-hover-grow’ link=’lightbox’ target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image] [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”] I’m writing this because I’ve watched a few videos on youtube where people have added routes and route groups and all this stuff into the routes file. And it … Continue reading “Laravel route file cleanup”