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.

Inbox and Authenticator App

December 16, 2014 at 11:46 pm | Apple, Apps.

Kinda strange that the Google Authenticator app can copy a code from it’s iPhone App but the new Inbox App for iPhone can’t paste that code into the 2 part authentication screen.

hmm shouldn’t these work better together?

Mobile first or age before beauty

December 10, 2014 at 11:36 pm | Design, SASS, web.

Mobile first for email. Oh course. Right?

There are more mobile devices accessing your content, why wouldn’t it be mobile first? Well because mobile doesn’t need any help. It is the faster more nimble sibling to it’s slower desktop and browser based elders.

Mobile first means that the styles in the head are for desktop. If gmail or other older email clients can’t parse or strip the styles in the head of the email, then the email will of course look bad in desktop or older clients. That doesn’t work.

The ramps on the sidewalk are not there because teenagers need help getting across the street, they are there for the older less able people. The desktop and browser based siblings of mobile email who need a little help crossing the street.

Go ahead and take a look at the list of email clients and the css media queries they are able to use and you will probably reach the same conclusion. Mobile email clients are better able to deal with modern css/html based email much better than most browser based or desktop based clients. Well at least with the exception of Gmail clients. They alone seem to have taken a page out of Outlooks book with things they will not do. Which is surprising considering how much Google did not want to be Microsoft.

For email it has always been, “Age before beauty”. Which means of course “Make it look good on older email clients first because the newer ones don’t have as many problems as the old ones. Kind of like the crosswalk. The ramps are not there for the younger more nimble people. They are there for the older or less able.

So what does desktop first email look like?

Desktop first email doesn’t look much different from mobile first email really. The exception is that the styles embedded inline in the email are for desktop and the media queries in the head of the email are for mobile clients. That is it. Since most mobile email clients will see and change the layout when they see the media queries in the email head, they are able to adapt. Unlike your aging parents/grandparents/uncles who need help understanding “The Twitter” and “The Facebook”.

Info at Litmus. https://litmus.com/blog/understanding-gmail-and-css-part-1