Rasmus Bang Grouleff, an allround nice guy and former colleague of mine, released a WordPress module on November 15 which outputs the JavaScript tracking code for Blogtoppen.dk.
After reading his post announcing the module I saw no option but to create a similar module for Drupal. This module is now available for download at http://drupal.org/project/blogtoppen.
To get started, go to blogtoppen.dk and register you blog. Then, go to http://yourblog.com/admin/settings/blogtoppen and enter the tracking code you received. Blogtoppen updates stats instantly so can make sure you installed and set up the module properly by verifying that their numbers update when you visit your blog (NB: tracking is turned off for uid 1).
Friday, November 20, 2009
Thursday, September 17, 2009
Working with User in Sitecore
Today is the second time I've been looking for the User template because I needed to add a field. This will probably happen again, but next time I have this blog post (HA!):
The User template is located in the Core database at /sitecore/templates/System/Security/User.
If you then need to get a list of all users in the database, run
var userProvider = new UserProvider();
foreach (User user in userProvider.GetUsers())
{
// Do something with user...
}
*NB:* This is based on Sitecore 6.
The User template is located in the Core database at /sitecore/templates/System/Security/User.
If you then need to get a list of all users in the database, run
foreach (User user in userProvider.GetUsers())
{
// Do something with user...
}
*NB:* This is based on Sitecore 6.
Tuesday, June 30, 2009
Performance improvements
This weekend I spent some quality time with Score Keeper working to improve performance.
First of all, memcached was installed and the dashboard is now cached. This lowered the execution time for that page by an order of magnitude from about 300ms on average to 25ms.
All icons are now in a single CSS sprite which is further optimized by running optipng on it. That way, all icons and the logo are in the same 7kb file which saves 10 HTTP requests.
Ruby on Rails was upgraded to the latest version 2.3.2, which saves memory and has a bunch of optimizations of its own.
Other than that, I did some small tinkering, such as moving the Google Analytics javascript below the page's javascript, which means that e.g. table sorting is operational about 1 second faster.
A lot of code was moved around and rewritten during this process, so let me know if you discover any bugs, new or old.
First of all, memcached was installed and the dashboard is now cached. This lowered the execution time for that page by an order of magnitude from about 300ms on average to 25ms.
All icons are now in a single CSS sprite which is further optimized by running optipng on it. That way, all icons and the logo are in the same 7kb file which saves 10 HTTP requests.
Ruby on Rails was upgraded to the latest version 2.3.2, which saves memory and has a bunch of optimizations of its own.
Other than that, I did some small tinkering, such as moving the Google Analytics javascript below the page's javascript, which means that e.g. table sorting is operational about 1 second faster.
A lot of code was moved around and rewritten during this process, so let me know if you discover any bugs, new or old.
Friday, January 02, 2009
"Killed" when running gem install or gem update
Earlier today while moving Score Keeper to a new server, I ran into a hurdle with RubyGems. When I ran the command
I searched Google and found a couple of suggestions, none of them helping me. It then dawned on me that it's been a while since I installed RubyGems on that server, and sure enough,
This is easily fixed by downloading the latest version of RubyGems from http://rubyforge.org/frs/?group_id=126 which, at the time of writing, is 1.3.1. Unpack the file, go to the directory where you unpacked it and run
This fixed the problem. YMMV, of course.
gem install rails -v=2.2.2, I got the following response:Bulk updating Gem source index for: http://gems.rubyforge.orgKilledI searched Google and found a couple of suggestions, none of them helping me. It then dawned on me that it's been a while since I installed RubyGems on that server, and sure enough,
gems -v reported that I was running RubyGems version 1.1.This is easily fixed by downloading the latest version of RubyGems from http://rubyforge.org/frs/?group_id=126 which, at the time of writing, is 1.3.1. Unpack the file, go to the directory where you unpacked it and run
sudo ruby setup.rb installThis fixed the problem. YMMV, of course.
Subscribe to:
Posts (Atom)