KEEP IN TOUCH

Join Newsletter

CALL NOW

Share with:


Recent Posts





ruby Tag

Today I've finished version 0.5 of my new Gem, Universal Track Manager. It's a plug-and-play Rails engine that you install into your Ruby on Rails application with just three simple steps (see the README). You can then immediately pick up your visitors': IP address Ad campaign...

Read More

Today I'm announcing 'a first look' at my new Gem: Universal Track Manager. It's an ambitious project that's going to have nearly universal appeal and utility. Visitors come to your site every day. Along with their visits, 4 key pieces of information come along for the...

Read More

1. deivid-rodriguez/byebug Byebug is a fantastic debugger available for Ruby 2 (and presumably above). Drop gem 'byebug' into your Rails app Gemfile and bundle install. In either your test run or your development run, write byebug on a single line of your app and voila. When...

Read More

1. Create an ErrorsController in app/controllers class ErrorsController < ApplicationController  def not_found   respond_to do |format|    format.html { render template: "errors/not_found",               layout: "layouts/application",               status: 404 }   end  end  def server_error   respond_to do |format|    format.html { render template: "errors/server_error",               layout: "layouts/application",               status: 500 }   end  end end 2. Add these to your routes.rb file match "/404", :to => "errors#not_found", :via =>...

Read More

Today I’ll take a moment to expound on how web development has changed over the last two decades. Long ago, when we started back in the 90s, connections were slow and web pages didn’t change much.

In the design of the internet itself is something you should be familiar with if you are reading this post: browser caching.

def wait_for_ajax  counter = 0  while page.evaluate_script("typeof($) === 'undefined'")   counter += 1   print "^"   $stdout.flush   sleep(0.1)   raise "Jquery not initialized after 10 seconds." if counter >= 100  end  counter = 0  while page.evaluate_script("$.active > 0")   counter += 1   print "_"   $stdout.flush   sleep(0.1)   if counter >= 100    msg = "AJAX request took longer than 10 seconds."    if page.driver.respond_to?(:console_messages)     msg << " console messages at time...

Read More