Youtube Auto Loop a Video

Looping a Youtube Video

I was working on adding a few features to a pet project – one of them was allowing users to add a youtube video to their profile page. In order to this though, we need to get familiarized with youtube and a few parameters we already know.

A commonly known parameter is autoplay, if we set this to “1” – the youtube video will play automatically on an initial page load.

The general structure is illustrated below, get familiar if you aren’t already – this is a pretty cool feature.

Continue reading “Youtube Auto Loop a Video”

SCP – Secure Copy

SCP – Secure Copy Command (Unix)

We all know about FTP (file transfer protocol), FileZilla, Cyberduck and friends – utility tools that allow developers to transfer files between clients and servers. I’ve used FTP over a million times in my development career. From backing up files, migrations, or new fresh installations of some framework or CMS system – like WordPress.

Well there will be some situations where you you might need the help of Unix’s scp – or secure copy. This is a command you have to run so those of you that’s never fired up the terminal will need to get your hands dirty with it. Play around and run some commands and make some mistakes – well in a sandboxed environment, don’t want to totally delete your entire life’ work.

Continue reading “SCP – Secure Copy”

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”

Javascript Fundamentals

Javascript Fundamentals

Whoa that title, yeah it made me cringe a little don’t ask me why. Perhaps it’s because I’ve seen it over countless times but I couldn’t think of a better title. I was gonna go with “Vanilla Javascript” but we all know that deserves it’s own space.

Javascript fundamentals is like going back in time, sort of like when the earth was formed. Were not going to get into the details of lexical environments or function scope or objects, well maybe a little on objects. Were going to just simply define a few javascript constructs.

Continue reading “Javascript Fundamentals”

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”

PHP’s is_numeric function

PHP is_numeric function

I’ve been wanting to write about PHP’s is_numeric() built-in function partly because I forgot all about it one day while validating one of my forms.

I get super anal about form validation because if it’s anything that’ll make or break your web application it’s security. Something dirty gets through your form it’s game over – or just bad data, bad quality. This means bad user experience – see how this kind of thing can trickle down through your application you worked so hard on?

Continue reading “PHP’s is_numeric function”

Expandable / Collapsible Text using jQuery

Expandable / Collapsible Text using jQuery

I’d like to first talk about my relationship with Javascript before I get into jQuery. I’ve known Javascript since the 90s, back when I was a young lad, Javascript freaked me out – I’ll admit I was really intimidated by Javascript more than I was with PHP. I mean they even have a modern looking official site for Javascript now that’s not so daunting.

Continue reading “Expandable / Collapsible Text using jQuery”