Fix for svg background images in IE11

June 2, 2020 at 2:17 pm | web.

Problem: Sometimes SVG images when used as background images do not show up correctly in IE11. This can sometimes show up as not covering the specified element background.

The trick here is the add the height and width back into the SVG as it might have been stripped out. Take the height and width from the viewBox attribute.

Before

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 2785.8 708.6" >

After

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 2785.8 708.6" height="708.6" width="2785.8">

Git and WordPress on a shared hosting environment

June 1, 2020 at 1:57 pm | Programming, web, Wordpress.

If you have a small blog or series on blogs on a shared hosting environment and and want to take advantage of GIT but still want to let your hosting provider keep your WordPress up to date, you can easily setup GIT repos and deployment to make your life easier.

Shared hosting services are great for a small site or if you have a bunch of small sites where you can setup different projects and not have to worry about the server environment or keeping WordPress or Drupal up to date. Hosting providers like Dreamhost, Bluehost, HostGator, SiteGround etc. are a great solution for some because they provide the hosting and upkeep of the WordPress install and you are free to add themes and plugins and do custom development on top. Most of these providers will automatically update the core WordPress on a regular basis. For business and enterprise class WordPress hosting I prefer Pantheon.

Read more »

Mobile ABV Widget

October 17, 2018 at 2:25 pm | blabbing.

I was reminded that I made this mobile friendly Alcohol by Volume widget the other day.
It uses basic slider or text inputs to do the calculations associated with finding the ABV in your beer/wine/cider. I made it because I couldn’t find an easier one online. It uses basic jQuery UI mobile components.

You can get to it here:
https://www.fuzzyraygun.com/gravity/

One of these days I’ll put it in Vue.js and let people store their calculations.

Ember on Apache

February 22, 2017 at 9:50 pm | Programming, web, Wordpress.

Ran into this recently and it reminded me of how WordPress does URL permalink routing. Since Ember routes are handled by the index this helps Ember on Apache route to links, especially when you are coming directly to a link or deep linking.

This should go in the root .htaccess file in the same way that WordPress needs as similar thing.

RewriteEngine On
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.html [L]

Default font-family not working in Outlook 2010, 2013 – Fixed

November 28, 2016 at 4:29 pm | Design, Email, Programming, web.

If you are wondering why Outlook 2010 and 2013 email clients will not render your font-family tag correctly, you are not the only one.

This is a known issue. So despite your fallback fonts being declared these older Outlook clients will use Times New Roman instead. You can always use the code below in the head to get around certain problems of old email clients. You probably won’t be able to get it to display nice Google fonts but at least you won’t be stuck with Times.

Validate AMP pages – New Relic

October 28, 2016 at 7:53 pm | Programming, web, Wordpress.

If you are looking to validate your AMP pages there is a nice tool provided by the AMPproject here. https://validator.ampproject.org/.

One of the things that may cause problems with AMP validation is the inclusion of New Relic JS in the head and footer of AMP pages. If you have a new relic instance running you may want to turn off the autorun for these template pages.

And yes, that is how that function is spelled. Link>

Strava API!

October 12, 2016 at 2:12 pm | Cycling, Programming, web.

I like cycling! I like Strava!! I like APIs!!!. All right lets make some stuff. API link http://strava.github.io/api/

Well not so fast. First you have to find the API key stuff inside of Strava. Not as easy as you would think. You can find the developer page here. http://labs.strava.com/developers/ but that doesn’t have anything about setting up an App like Twitter or Facebook or something like that.

You can find the App setup/API page under your account settings. If you login to you Strava account and in Account->Settings you add API to the URL you magically now have an API Application nav choose in the left nav. https://www.strava.com/settings/api

You can now add your application and get your ID, Client secret and Access Token to begin your development.

Go choose a language

 

WordPress 4.4 and missing images

December 11, 2015 at 4:11 pm | Programming, web, Wordpress.

If you have upgraded your WordPress to 4.4 and have a secure HTTPS URL, you might be experiencing image problems due to a mixed content URL message in the browser. Some browsers will display the content and give you a message that it is mixed and some will block the content all together.

The new WordPress responsive sourceset image addition could be the problem.

The image itself is coming from the HTTPS secure URL, but the alternate image sizes in the image sourceset tag might be coming from HTTP if your config.php URLs are set a certain way.

This will cause image problems.

define('WP_SITEURL',     'http://www.NAMEOFYOURSITE.com/');
define('WP_HOME',        'http://www.NAMEOFYOURSITE.com/');
define('WP_CONTENT_URL', 'http://www.NAMEOFYOURSITE.com/wp-content');

This will fix it.

define('WP_SITEURL',     'https://www.NAMEOFYOURSITE.com/');
define('WP_HOME',        'https://www.NAMEOFYOURSITE.com/');
define('WP_CONTENT_URL', 'https://www.NAMEOFYOURSITE.com/wp-content');

If you want to be able to have your local dev site without https in those variables you can just do a switch statement in the config.php based on the URL.

switch ($_SERVER['HTTP_HOST'])
{
	case 'NAMEOFYOURSITE.com.dev':
                 define('WP_SITEURL',     'http://www.NAMEOFYOURSITE.com/');
                 define('WP_HOME',        'http://www.NAMEOFYOURSITE.com/');
                 define('WP_CONTENT_URL', 'http://www.NAMEOFYOURSITE.com/wp-content');
		break;
	case 'www.NAMEOFYOURSITE.com':
		define('WP_SITEURL',     'https://www.NAMEOFYOURSITE.com/');
                define('WP_HOME',        'https://www.NAMEOFYOURSITE.com/');
                define('WP_CONTENT_URL', 'https://www.NAMEOFYOURSITE.com/wp-content');
		break;	
}

Magic Mouse keeps disconnecting from bluetooth – FIX

July 31, 2015 at 3:19 pm | Apple, Apps.

F**king MOUSE!

If you have been having trouble with your Apple Magic Mouse or keyboard and it has been driving you bonkers like these people. https://discussions.apple.com/thread/2217770?tstart=0  You might start to look at the other devices and Apps around you that might be causing the problem.

My Apple Magic Mouse had been working perfectly fine for years when all of a sudden everyone in the office started to have the same problem. People on the internet kept saying it was the “Size of the batteries” or “the battery connectors”. If there was a crazy crackpot way to fix it, I tried it. But it didn’t work and I Knew that it wouldn’t. My reasoning was that this problem was something new since my mouse had been running fine for years before this. Software update?

It drove me CRAZY.

Along comes a knock on the door

It wasn’t until my office neighbor knocked on my door did I figure it out. My neighbor asks if there is a person named “Bob” (name changed to protect the guilty) here. I say he’s not here today but yes, Bob is in my office. They proceed to tell me that Bob’s computer is constantly screwing with their bluetooth mouse and it’s driving them crazy. How can this be? He is not even here.

Turn’s out “Bob” has installed a cool little App that unlocks in login screen when ever he is close by using Bluetooth and proximity. Kinda like this. http://nearlock.me/

What the App is doing is constantly looking for the iPhone App to see if it can unlock the computer. EVEN in sleep mode. Which means that even though “Bob” is not here, his computer is still screwing with everyone’s bluetooth peripherals.