Friday, December 21, 2012

Asus RT-N66U, Asus EA-N66, and Airplay

Alright, long story short, here was my setup:

Asus RT-N66U as my main wireless Access Point. Asus EA-N66 acting in Repeater Mode. And NO Airplay was working. No matter what I connected my devices to - the main Access Point, or the Repeater, Airplay would not work. Airplay devices would not show up. Just basically at a loss.

After trying a bunch of things - I e-mailed ASUS - and as it seems with most routers - the issue was the firmware.

I upgraded the EA-N66 Repeater's firmware to the latest at this link:

http://support.asus.com.cn/Download.aspx?SLanguage=en&p=11&s=1&m=EA-N66&os=30&ft=20&f_name=FW_EA_N66_1017d.zip#FW_EA_N66_1017d.zip

And all was fine! Everything was working again!

Hope this helps some peeps.

Friday, December 14, 2012

jQuery animate scrollTop Flicker

Hey everybody,

was doing some scrolling animations on my one-page site using jQuery's animate function.

This is the basics of what I had:


$(function(){
  $("#link").click(function(){ 
    navigateTo(".section");
  });
});

function navigateTo(destination) {
  $('html,body').animate({scrollTop: $(destination).offset().top - 48},'slow');
}

The issue I was seeing is that the animate was happening, but so was a flicker. The flicker was caused by the default behaviour of clicking on a link with href="#". The problem is the default behvaiour of that is to scroll to the top. So it would quickly scroll to the top, then scroll to the destination. Solution? Block the default behaviour by returning false in the event handler of the click.


$(function(){
  $("#link").click(function(){ 
    navigateTo(".section");
    return false;
  });
});

function navigateTo(destination) {
  $('html,body').animate({scrollTop: $(destination).offset().top - 48},'slow');
}

Hopefully that will help some peeps.

Wednesday, December 12, 2012

Nest Thermostat Heating Issues

Problem

Alright, so I absolutely love the Nest - as it seems every Nest owner does. I was using it all leisurely during the summer and enjoying all of its benefits - but then when winter came - my Nest starting wigging out.

I thought originally it might have been my setup at my condo. My condo is one of those buildings where it's either "COOL" or "HEAT" on. Not both. So at one point in the winter, the building switched the heat on.

Now, even with my old thermostat - it's one of those on/off dealies. So if my thermostat was set to cool - the heat would actually turn on when the thermostat was "Cooling". But that's a separate issue. This is true of all thermostats for these types of buildings.

No - the issue that I was having separate. When I switched to heating, on the Nest - and when I set it to temperature that was higher than the current room temperature - the Nest should have started heating my place right?

Wrong.

Here's what happened (ie. the symptoms in case you're having the same issue)

Setup

  • Nest V1
  • Electric Forced Air Furnace
  • Wires: RH, Y1, W1, G

Symptons

  • The Nest was in "HEAT" mode
  • I set the Nest to a temperature hotter than the current temperature to engage heating
  • The display would show "Heating" for about 2 seconds, and then go to "Delayed for 3:00 Minutes". My fan would kick on for a bit, but that was it.
  • After the 3:00 minutes, same thing would happen "Heating" for about 2 seconds, and then back into "Delayed for 3:00 Minutes"
  • Here's the telltale sign - just after "Heating" for about 2 seconds, and just before "Delayed for 3:00 Minutes", the little green LED in the sensor area would blink (this should have been a sign to me).
  • So it would end up in the endless loop of "Heating" for about 2 seconds, and "Delayed for 3:00 Minutes" with that green LED flashing.

I called Nest Support - and it turns out it was a Voltage issue. Even though I was getting good voltage readings, there was an issue.

How to solve it?

I'm not taking any liability for this - and you should probably call Nest support - but you can try the follwing.

Temporary Work-Around

This has actually become my permanent work-around, because I don't feel like re-wiring my condo. The work-around is to UNPLUG THE COOLING "Y1" WIRE from the Nest during Heating seasons like Winter - so you just have RH, W1, and G. This apparently reduces the load or something. This works perfectly for me. I just have to unplug the wire/plug it back in once a year.

Permanent Fix

Nest support told me to run a wire from the furnace board's "Common" terminal to the "C" terminal on the Nest. Basically you need a common wire. However, I didn't have any extra wires long enough in my setup to do this.

Hope this helps some peeps.

Tuesday, December 11, 2012

Windows 7 Mongrel Rails Port 80 Permission Denied Bind(2)

Alright, just spend an annoying amount of time on solving this issue, and although this issue can manifest itself for many reasons - I'll share my specific reason and hopefully it will help others.

The specific error from the mongrel logs is


** Starting Mongrel listening at 0.0.0.0:80
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/bin/../lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Permission denied - bind(2) (Errno::EACCES)


The issue is, I was trying to deploy a rails app that's run using mongrel on Port 80. This has been successfully deployed to many sites running Windows 7 Pro, and I was trying to deploy it to Windows 7 Home Premium. At first I thought the operating system was the issue, but it definitely wasn't.

After googling around for awhile, I found a lot of posts linking it to IIS conflicts. But the thing is, I didn't have IIS running on my machine - no "World Wide Web Publishing" service running - or at least not in its entirety.

You see - what the issue was - was that I do some .Net development on this computer - and at one point for testing purposes, I installed IIS Express. Yes, IIS Express was the culprit. The hard part was, is that IIS Express shows up as a differently named service - it's called "Web Deployment Agent Service".

I launched up Services.msc, disabled this service- and bam, things were up and running.

Hope this helps some peeps.

Tuesday, July 31, 2012

BiteSite.ca launches

Hey everybody!

I just launched my new Web Design and Web Development business, BiteSite.ca. We're based in Ottawa Canada and are here to build web sites and web applications for all sorts of customers including

  • Small to Medium Businesses
  • Individuals
  • Wedding Couples
  • Event Organizers
  • and more!
We also provide Video and Photography services. Anyway, check us out at www.bitesite.ca!

Friday, June 15, 2012

Rails 3.0 and JQuery-UJS Rails.js

So there are a bunch of posts and a great Railscast about using Unobtrusive Javascript and Rails.
The rails cast even gives a great section about using JQuery instead of Prototype - and how there's a specific rails.js for JQuery. But I definitely had issues getting this going until today - so hence the blog entry and a mistake perhaps that is not published yet on other posts.

First some background.

So Rails 3.0 and below used to use a Javascript library called Prototype by default. This javascript library (like JQuery) allowed for some powerful javascript functionality with little code. However, I'm a JQuery guy, so I opted to use JQuery.

So the deal is, in my layout, I used a javascript_include_tag for JQuery so I could start using JQuery all over the place in my app. The issue? As soon as you use JQuery instead of Prototype, a bunch of stuff starts breaking - the biggest most obvious culprit? The Delete link.

In scaffolding or even in your own coding, you may write a link that looks like this:

<%= link_to "Delete", @resource, :method => delete, :confirm => "Are you sure? %>

Now the thing to know about this is - this generates a link with specific attributes. And its those attributes that identify it as a special link. What identifies it as a special link? rails.js

Rails.js will look at links like this - dynamically create a form around this link, and then submit it when you click on the link. That's why the replacing this with "button_to" solves the problem in one way. Because button_to creates that form for you, and doesn't rely on rails.js to create that form.

Now the problem is - the default rails.js that's included in Rails 3.0 and below relies on Prototype. So if you switch to using JQuery - the default rails.js isn't going to work.

This is where the Railscast gives a good explanation to hit up the jquery-ujs github account (just Google jquery-ujs and you'll find it), and download the rails.js that exists there.

In you application (probably) you're layout, if you use a javascript_include_tag to include both JQuery, and the jquery-ujs version of rails.js - you should be good to go.

(and believe me if you do the steps right - you will be good to go).

I, however, did not do the steps correctly.

I followed the logic and followed the instructions and still things were breaking.

What did I do wrong?

Something really stupid. I downloaded the jquery-ujs/rails.js file incorrectly. I was using my browser and just right-clicked and "Save link as...". The problem is - I wasn't downloading the raw source code file which is what you need. The best way to do this is when in Github, jquery-ujs, click on src, then click on "rails.js". Then click on the "RAW" button to grab the actual source file. This was the key.

So just in case anybody else runs into this issue, make sure the rails.js file you're getting is the true raw source code file.

Btw, for Rails 3.1 and above - you don't have to worry about this. Rails 3.1 made JQuery the default javascript library (instead of Prototype) - and as an added bonus, they by default include the "jquery-rails" gem in the Gemfile. This gem contains both JQuery and the Jquery-ujs Rails javascript files and it automatically serves them up through the asset pipeline.

So all the information was already out there - I just made a stupid mistake that maybe some of you might run into so I thought I'd blog about it.

Monday, May 28, 2012

Namecheap E-mail Forwarding to GMail

Alright, so I've seen several posts of this and experienced it myself and I couldn't seem to find an answer. Luckily, in mucking about I seemed to stumble about a solution that has worked thus far.


The Issue:

The issue was that if you registered for a Namecheap domain, and wanted basic e-mail forwarding, it didn't seem to work with GMail. No, I'm not talking about using Namecheap's e-mail servers, no I'm not talking about Google Apps for business, I'm talking basic forwarding of one e-mail address to another. For example, forwarding info@mydomain.com to myaddress@gmail.com. For some reason, it would work with e-mail service providers like Hotmail but not with GMail - and GMail really is my favourite.


The Solution:

Alright, the solution that has worked for me seems to lie in assigning an e-mail alias in GMail. But the only way you can do that is temporarily forward your e-mail to a non-GMail account.

So what you end up doing is temporarily forward your domain e-mail address to a non-GMail account, and then add an alias to the GMail account (which sends a verification e-mail to your non-GMail account). Once the GMail alias has been verified, now you can set your Domain to forward to your GMail account.

Here are the steps:

There are 3 accounts we're dealing with:

  • a. Domain account - in our example "info@yourdomain.com"
  • b. Non-GMail Account - in our example "me@hotmail.com"
  • c. GMail Account - in our example "me@gmail.com"


Register Your Domain and setup e-mail forwarding to non-Gmail Account

  1. Hit up www.namecheap.com and register your domain.
  2. In your domain settings, click on "E-mail Forwarding"
  3. Setup an entry to forward "info@yourdomain.com" to non-GMail account like "me@hotmail.com".


Test E-mail

  1. Send an e-mail to "info@yourdomain.com", you should get it in your hotmail.


Setup your GMail account

  1. Log into your gmail account, and go to settings.
  2. Under Accounts and Import, look for "Send mail as..."
  3. Add your "info@yourdomain.com" account.
  4. This will cause GMail to send a Verificaiton e-mail to "info@yourdomain.com" which should end up in your non-GMail account "me@hotmail.com".
  5. Enter the verification code
  6. Make "info@yourdomain.com" your default account.
  7. GMail is now setup send mail as "info@yourdomain.com" and for some reason this unblocks the namecheap forwarding.


Switch Forwarding E-mails to GMail Account

  1. Now that GMail doesn't block namecheap anymore, switch your e-mail forwarding entry "info@yourdomain.com" to forward to "me@gmail.com"

Sunday, April 29, 2012

Gitting to Know You

Hey everybody,

just a quick note, I've started some tutorial videos on GIT. If you're new to Git, check 'em out and spread the word.

http://www.caseyli.com/gittingtoknowyou