Importing sql database using the command line

Importing sql database using the command line

This is definitely worth a post. Just when I want to disregard this utility as trivial – every now and then I get a consulting gig where I need to run a full backup – yes of everything, files, database, the works. You see, sometimes I get a task that isn’t as black and white as it may seem at first glance – something is a bit unconventional, but you know – there is nothing wrong with that. Sites come in all shapes and sizes, in all sorts of architectures. It’s good to get exposed to a variety even really weird ones. Look I’d rather poke around a dev site over production no matter how tempting it is – I’ve seen way too many sites go down in my life time, it’s not worth the gamble. I tell every junior developer – the first thing you should do is create a back up. First thing you should do. Then you can show off your programming skills later and you know – be that “rockstar” developer you were meant to be.

Continue reading “Importing sql database using the command line”

Javascript’s defer vs async attribute

Javascript’s defer vs async attribute

Flashbacks of vanilla javascript cloud my mind – back when we didn’t have Jquery. All we had was Javascripts’ event listener method to detect whether the entire DOM was loaded before scripts were fired off.

Why was this necessary though? Well, if you’re a developer you very well know – page speed. And back in those days, programmers weren’t so mindful of placing external javascript files – the head section, footer and I’ve seen some sprinkled throughout the body. Not optimal at all – this can have huge negative implications in terms of functionality and speed.

Continue reading “Javascript’s defer vs async attribute”

WPEngine, Nginx and htaccess

WPEngine, Nginx and htaccess

Redirects can get hairy sometimes – sometimes you get a nice clean canvas of directives, sometimes it’s messy and undocumented. Whatever the case, you’re dealing with an .htaccess file. One wrong move and you can crash your site
or worse yet a clients site. So before anything else make sure you have FTP access and you create a back up of their existing .htaccess file. Don’t even be tempted to do it through Yoast – even though they allow you to edit the .htaccess file right through WordPress. I’ve seen it happen and it isn’t worth it.

So you’ve got the .htaccess file – you’re going down line by line. It can look like a jungle at times – you’ll see caching stuff, some 301 redirects, some permission stuff.

Continue reading “WPEngine, Nginx and htaccess”

The Genesis Framework

The Genesis Framework

I’ve been running into the WordPress Genesis theme as of late. It’s not your standard wordpress theme when it comes to modifying template files. Genesis is actually a framework, that would be a better way to describe it. Genesis frameworks extend their functionality, allowing developers to customize their WordPress site.

The Genesis framework is built by Studio Press – I’m quite impressed with their work actually, it sounds like a solid framework I just need to learn more about it. So I dove right in – I scoured the internet for some learning material and a good list came up. This can only take you so far though – the best way to really learn is actually do it yourself, so that’s what I’m gonna do.

Continue reading “The Genesis Framework”

Mobile-Friendly Test by Google

Mobile-Friendly Test by Google

Googles’ rolled out with a new tool – Mobile-Friendly Test. At first I was a little skeptical about it like I am with any new thing – I question things before I start trusting it. It’s not that I’m resistant to change, that would be a bad thing – change is good. Change is growth.

In my consulting work, I noticed there has been a high demand for using this tool – mainly marketing agencies looking to further audit and optimize their client websites. A visual audit just isn’t good enough, meaning the obvious isn’t so obvious anymore just by visually testing a site on a mobile device. There’s a difference between how we see it and how Google sees it and let’s face it – Google owns everything. Sometimes I feel like Google is the AI (that’s going to take over the world) everyones been talking about.

Continue reading “Mobile-Friendly Test by Google”

The target parent HTML attribute

The target parent HTML attribute

I love HTML. Love it so much I like to write about it in its purest form. Even attributes people don’t think about or won’t dedicate a single post too. I can’t count how many times I’ve used HTML’s target attribute in my development career. Everyone’s talking about concepts, frameworks, paradigm shifts and all that. I’d like to talk about the target attribute.

_parent isn’t used all too often in my experience, so I’m going to use it in my example below.


<a href="/some-page.html" title="The Title of this Hyperink" target="_parent">HyperLink</a>

Continue reading “The target parent HTML attribute”

CSS3 Transitions

CSS3 Transitions

CSS3 has settled in quite nicely into the development playground for me at least but for businesses, this property alone provides some serious value. If you’ve been programming since the early 90s, you’ll see that we’ve gone a long way with interactive elements – javascript not included. In this post I’m talking about CSS3 Transitions, as mentioned on another post CSS alone is a major powerhouse.

So let’s go back in time a bit when we had to use images to indicate user feedback – a scenario would be a visitor hovers a link and then it changes color or is underlined after you hover it. This is a good thing – it lets the visitor know the element does something, presumably a link that goes somewhere. But designers and developers stepped it up a notch by adding image rollovers, we kinda needed the help of Javascript.

Continue reading “CSS3 Transitions”

Creating a custom modal with just jQuery and CSS

Custom Modals using Jquery

I was working on a site, it’s your standard WordPress site. I’ve worked with WordPress a long time and seen a lot of different scenarios. The client had this important image on their site that needed to be enlarged in a lightbox or modal, visitors just had a hard time reading small text. Of course you would think hey just use a bootstrap modal component. Well they didn’t have bootstrap installed – well they did but they were just parts of it based on another plugin they had installed. This would even further complicate things.

Modal from scratch

My second solution was to see if they had jquery installed – well of course they did. But is it in the header? In the footer? Some weird spot, yeah I’ve see that before. If it was in the footer where it ideally ought to be then we should be good right? Oh yeah by the way I haven’t even talked about writing the script – I’m looking for a good place to put the script first. Yeah, that’s this is just the first part. So I was thinking maybe I should just use a plugin for this – easy and get it over with. But why when I could write it all myself, so that’s what I did .
Continue reading “Creating a custom modal with just jQuery and CSS”

Google Page Speed Console

Google Page Speed Console

I get a lot of consulting gigs having to do with Google Page Speed – basically an assessment on how fast a website loads on a browser. You might be curious why this is important if you haven’t worked with SEO or Web Development. The thing is you don’t even need to be a techie to know why this is so crucial in almost every aspect of running an online business.

Google Page Speed Insights

I remember working for a start up back in the 90s and being part of a meeting having to do with this subject. I barely knew how to write some HTML back in those days, I was such a noob. Anyway, back in those days SEO was still really finding its place in terms of job title.

Continue reading “Google Page Speed Console”