You can use two criteria to determine if a script should be minified or not:
And that’s that!
This is how it works
Times are changing! This old beer ad is in Swedish but in short it says:
Pripps in a new disposable pack, for the sailing tripp. Extra tip: Make a hole in the bottom of the empty pack and it will sink faster.
It feels we at least have come some way regarding recycling.
Click on the image for a full scale version.
It seems WordPress is hard coding the domain name into the database. How smart is that, or have I missed something? When I first set the site up on my local development server I soon noticed that various links were written hard with the domain and everything. Obviously that would f**k thing up once the site was moved to the public server. So I went into the settings and saw that there were two fields – WordPress address and Blog address – containing absolute paths. So I changed them to relative onces, e.g
/blog instead of
http://strindberg.loc/blog and things seemed to work properly.
Now I just realized that the
guids in the RSS feed pointed to my development server. I looked in the database table and saw that there were hard coded references to
http://strindberg.loc. So with a little
UPDATE wp_posts SET guid = REPLACE(guid, 'strindberg.loc', 'www.poppa.se') I thought I had solved the problem. But then I realized some other
guids in the RSS is generated on the fly, and they get f**ked up since the
WordPress address now is relative and thus some
guids looks like
http:///some-url/. Is that good or what?
And try to figure out how to find out where those
guids gets generated. My idea was to find where they are generated and there insert the
HOST dynamically, but since there’s a zillion
apply_filter(...) it’s virtually impossible to find where the shit gets generated (thanks to Netbeans it’s otherwise simple to follow the chain of execution. Just
ctrl+click on a function call and the source of that function will be loaded.)
Ok, so now I have to put on my Sherlock hat and see if I can solve this. I find it hard to believe you shouldn’t be able to move a WordPress site from one domain to another without having to work your ass off!
If anyone have a solution – it’s perfectly possible I’m missing out on something here – I’m happy to know!
It hit me I hadn’t done anything to my site for three years. After all I’m a web developer and some kind of standard must be met and kept!
The previous version of this site was built on my home cooked blog application. But that was written three years ago and you learn, and develop skills, a lot over three years, so I didn’t feel like reusing it and it was kind of limited regarding lots of stuff – like social networkning – that has emerged over the past few years.
Since I’m an open source advocat I decided to live as I learn and went for WordPress. It was really simple to setup and the admin interface is rather uncluttered and easy to use. Although I’m not too fond of how the backbone of WordPress is coded and structured it’s fairly easy to bolt on your own functionality.
Hopefully this new version of the site will make me write more than two posts a year, but I wouldn’t bet on it
The other day at work I was hacking up a console application that converts an Excel workbook to chosen format. This is to be used in a web application where some people can upload an Excel file that will populate a MySQL database. To make it easier to parse the Excel file the console application will save a copy of the file as a tab separated file that is easier to parse (I will share the code when done).
Anyhow! At work I use Visual C# 2008 Express Editon when – very rarely – hacking C# and it annoyed me that the code part was too far to the left for me to feel comfortable. So I though I could displace the right column with class viewer and solution explorer and put that on my right screen, narrowing the main window and put farther to the right on my left screen.
So I did and it felt alright – until I tried to compile the application. Visual C# just crashed big time! I didn’t have any clue why at that moment so I fired it up again and had to displace the right column again and put everything where I wanted it. I tried to compile again and boom, crash again!
So I thought: What the heck! Fired the thing up again, displaced the right column but this time I thought I’d just close the application so it would remember my settings the next time it was started. So I just hit
ALT+F4 and boom, crash again. After repeating this again I came to the conclusion that Visual C# 2008 crashes if you displace the right column and then tries to either compile the current project or close the application it self. There’s probably some other actions that will cause it to crash as well.
The final conclusion is that I will have to use the application layout dear Microsoft has decided I should use. Thank you very much! Okey, I can live with it but it’s a bit annoying!
Anybody working on a replicated web site (with an edit/backend server and one or more frontend servers) with perhaps lots of sub sites has probably experienced the hassle of switching domains between the backends and frontends.
Say you get an email saying: Can you change … to … on
http://some-front-end.com/some/path/to/a/page.html. You click on the link, since you’r lazy, and then have to change the domain in the address bar to your backend domain and 40% of the time you misspell and have to go up there again and…
Anyhow! I got tired of this so I created a domain swapping extension to Firefox. It adds a context menu (right-click on any page) where you can choose to change to another domain – the URL will stay intact.
So if you are working with replicated sites the extension is free to download at:
Lately I have found a new time waste – playing with Photoshop and Gimp to create desktop wallpapers. I must say Gimp isn’t too bad although it’s quite far behind Photoshop when it comes to usability and especially layer styles. I downloaded a plug-in that works pretty well and similar to the effects in Photoshop, but the big difference is that the effects will be put in separate layers in Gimp which means you can’t fine tune them in real time afterwards. And one really misses the layer folders! Anyway, Gimp works pretty well and when you get used to the differences from Photoshop and you learn the shortcuts it’s quite usable after all.
All wallpaper are in 1680×1050px
Fairytale – Made with Photoshop (image and butterfly from Stock exchange)
So the Roxen User Conference has come to an end. It’s always nice to meet with people who speak the same “language” (the language of the geeks perhaps), to share experiences and solutions. And of course it was nice to see the Roxen Editorial Portal in action. That’s a pretty cool piece of web based software. It was also nice to get a preview of Roxen CMS 5.0. It will have a few new features that will be nice and perhaps the greatest thing is that it will incorporate Pike 7.8 (which in it self hasn’t been released yet).
Anyway! For me it was a great experience talking to other Roxen customers and share some ideas and views. Oh, and one more nice thing: during the conference Roxen released a community site – planet.roxen.com. I hope it will be a great resource for us Roxen customers and users.