Entreprehero! Blog of Björn Lennartsson - Wantrepreneur and developer

Upgrading from Rails 4 Beta1 to Rc1

When you are upgrading from Rails 4 Beta1 to the newly released Rc1 you might run into some problems. I got this one: The fix is to edit the file located in config/initializers/session_store.rb and change from to Voila!

Continue reading →

Times are a changin

Hiya! It’s been a long time since I last posted and lots of stuff have happened since. I have now been away from Sweden for one and a half month living in Thailand and working with my company and studying. Let me tell you, life…

Continue reading →

FIX: Capistrano deploy fails after changing repository URL

We have moved some of our clients repositories from Github to Bitbucket but when we tried to deploy we got the following error: I tried making a clean-up but that didn’t work. The solution however is pretty straight forward. You just need to login to…

Continue reading →

Detect if mouse click is from user or if triggered by code

I was coding a carousel solution for a client and wanted the automatic playback to stop if the user interacted with the image slider. First I thought that I would need some kind of custom solution but seems it was easier than i thought. The…

Continue reading →

LD25 – Revenge of Dr Green

My entry to the Ludum Dare 48 hour competition. The theme for the competition is “You are the villain”. I made a little twist on this as you can see I’m pretty tired now so won’t make any big write-up. Will probably write something later…

Continue reading →

Regular expressions in Notepad2 (with backreference)

Regular expressions is really nifty to use when you got a chunk of data and need to extract or change certain parts of it. I’ve used it before in Notepad2 to replace mostly with empty strings but this time I wanted a little bit more….

Continue reading →

How-to: Make a cannonical redirect with Apache

Me and my goldfish brain tend to always forget how to make a proper cannonical redirect with Apache. So this is just a post for myself so that I don’t need to Google for it every time and read through posts with grade-A bullshit in…

Continue reading →

Mod Rewrite Online Test Tool

Everyone who has worked with rewrites knows that it can be a pain in the ass to get it right sometimes. I was working with some rewrites for a client and got tired of testing live on the server. Looked around a while on StackOverflow…

Continue reading →

Git Cheat Sheet

Today is my 30th birthday. For this I will give all of you a little present which I’ve been working on. The ULTIMATE Git cheat sheet! Enjoy Download Git Cheat Sheet (PDF)

Continue reading →

How-to: Show SQL database query in rails console

When you are optimizing your database queries it might be nice to use the console and try out the changes in real time. However, by default you won’t see the query that is sent to the database by default which is a nice feature to…

Continue reading →

Page 1 of 3 1 2 3