Slipsnisse.se

The Web

My web tips, and by this I mean links to sites where people actually have a clue.
Or when the day comes that I actually have some time over to sit down and think through something.
And have even more time to write it down.

Regardless, I’ll try to make it worth your while.

CakePHP Auth component issue

29th of May, 2010

If, when you add the Auth component, you get the inte the “redirect loop” try adding:

if (isset($this->params['requested'])) {
$this->Auth->allow($this->action);
}

Should fix it. Worked for me.

VirtualBox

26th of February, 2010

Accessing host webserver from within VirtualBox: IP 10.0.2.2 … note to self mostly.

Flash

8th of November, 2009

Flash är lite av webbens gissel för det ger oss en hel del roliga spel och sånt men samtidigt så är det inte särskilt anpassat för spel.
Speciellt på facebook där t ex Happy Aquarium blir toksegt så fort man har för många fiskar som rör sig samtidigt. Det kan iofs ha att göra med hur pass bra grafiken är gjord och sånt för om man jämför Farm Ville med Farm Town så är Farm Town inte alls lika segt men grafiken är sämre.

En annan sak som stör är att det endast finns en webbläsare som det flyter bra i och det är Firefox men där ha Flash en tendens att skena iväg och äta upp allt minne i datorn medans i t ex Chrome så blir det bara segare och segare ju mer som händer.

Undrar om Silverlight skulle funka bättre… men då kan inte icke-windows-operativ va med längre.

Pest eller kolera.

Flash

8th of November, 2009

Flash är lite av webbens gissel för det ger oss en hel del roliga spel och sånt men samtidigt så är det inte särskilt anpassat för spel.
Speciellt på facebook där t ex Happy Aquarium blir toksegt så fort man har för många fiskar som rör sig samtidigt. Det kan iofs ha att göra med hur pass bra grafiken är gjord och sånt för om man jämför Farm Ville med Farm Town så är Farm Town inte alls lika segt men grafiken är sämre.

En annan sak som stör är att det endast finns en webbläsare som det flyter bra i och det är Firefox men där ha Flash en tendens att skena iväg och äta upp allt minne i datorn medans i t ex Chrome så blir det bara segare och segare ju mer som händer.

Undrar om Silverlight skulle funka bättre… men då kan inte icke-windows-operativ va med längre.

Pest eller kolera.

Email regexp

15th of September, 2009

Too much fluff and adds surrounding these things when I search:

/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/

Keep it simple! You’re welcome! =)

Apache på windows

13th of August, 2009

Hur man ställer in vissa saker...

A sense of humor..

18th of June, 2009

I don’t think I need to say anything else?
W3C Mailing list…

New design

18th of April, 2009

Not finished but I felt I had to get it out there or I would never finish it.

So here you have it, comments form isn’t done, not that it matters since commenting doesn’t work either.
And the comments list isn’t done either.

I’ll get to it, it’s not the site has to be perfect, it’s just my own playground anyway. :)

Update: Category pages don’t look good. And if you don’t like the border-radius with the box-shadow in Google Chrome, tell Google to fix Chrome because it looks good in Safari and Firefox 3.1. So there!

The Tooltip is my own and it is hosted att Google Code and is called DropDown it was a working name and I’ll just have to live with it now. ;) Hover the dates to see the tooltip.

W0rking on a new design...

2nd of March, 2009

It’s gonna be simple and make use of stuff that the good browsers has built in… border-radius and stuff like that.

Soon, just have to find the time to finish it.

window.­external.­AddSearchProvider

13th of January, 2009

window.external.AddSearchProvider is part of the OpenSearch 1.1 Draft and is available in both Firefox and IE7/8 but there is a slight difference in how it works, or rather doesn’t work.

Don’t missunderstand me, it works in all of the above browsers but NOT in the same way.

In Firefox you can wrap the function call in another function call, to do object detection and those nice things.
But in IE7/8 you have to call the function from an inline onclick event handler. You can’t wrap it in any way or it won’t work.
If you do you get the most common JS error in IE “The object doesn’t support this property or method”.

Just FYI for those of you who doesn’t want to spend four hours wondering what you did wrong. Like me! ;)

A stupid IE solution

30th of September, 2008

If you thought that there is any other kind of solution to any IE quirk you’d be wrong.

Sorry about the lack of screenshots.
I had a problem with lists and the fact that IE rendered the list-item’s with a “Ghost Margin” at the bottom which meant that the list didn’t line up properly.
So I started to look for solutions, needless to say all other browsers behaved like expected, and tried to reduce the line-height, didn’t work.
Added zoom:1 to IE stylesheet? Didn’t work!

I few more silly things like negative margins and friends… didn’t work…

So it ended with me staring at the style for the LI in IE Developer Toolbar and noticed that the LI had a default vertical-align set to baseline.
Now why should a LI have vertical-align?
Well, I have no idea but I changed it to bottom and the problem went away. Just like that!

Not the most obvious solution but it works.

I read somewhere “I don’t know what’s going on inside IE’s rendering engine, but I bet it ain’t pretty!”. I’ll second that.

Nytt jobb

26th of June, 2008

Har precis börjat på nytt jobb, nåja jag är inne på tredje veckan så så ny är jag inte längre. Trevliga, duktiga kollegor och lite roligare arbetsuppgifter är det iaf. Jo just det, jag har börjat på Eniro.

Hockeymasks

21st of May, 2008

I went looking for pictures of Pelle Lindberghs mask and found www.hockeymasks.com!

Check out their catalog, there are some really weird masks in there, and some really cool ones as well. Well worth a visit.

The reason I went looking is that I have, what I think is, a pretty cool idea for a tattoo.

Måste bara dela med mig

19th of March, 2008

A perfect day

New fun stuff from Microsoft

5th of March, 2008

I ran across the link How do I make my site ‘light up’ with Internet Explorer 8? on Anne Van Kesterens blog today and I must say that IE8 is really shaping up to be pretty a useful browser.

Microformats, huh, who knew?, although it is not a specification or even a draft it really is a step in the right direction.
And before you start bitching about the Activities Provider stuff you must remember that Mozilla has a lot of the same kind of stuff built in as well.

As long as developers remember to be unobtrusive these things are not going to be an issue, it’s up to us!!

  • Activities Providers: Basically the same as when you select a search engine in Firefox and right click and select “Search [provider] for [selection]”
  • WebSlices: doesn’t quite get it but I probably will when the first public beta hits the shelves.
  • CSS 2.1 Compliance: Well, call me jaded but, we’ll see. The tests seems to work in Firefox so I hope it is the same for IE8. But as the above mentioned page says: “The W3C CSS working group has made great strides towards converging on a final specification for CSS 2.1. At the time of this writing, the specification is in ‘Candidate Recommendation’.”. The part I am thinking about is “Candidate Recommendation”, meaning it’s not even finished and developers are ready for CSS3 already. It’s a little bit pathetic.
  • Data URI’s are cool, saves the browser a trip to the server at least. Optimization friendly.
  • Printing Improvements: This is a major disappointment in all browsers …

And then they get to the cause of such debate lately: <meta http-equiv=”X-UA-Compatible” content=”IE=7”> and sure, why not, it makes it real easy for developers to fix intrawebs and customer webs in a flash and still get the browser out onto the market. That’s all I will say on the matter, unless the change their mind again.

  • DOM Storage: Just like Mozzy does it
  • DOM Core Improvements: the examples shows an open mind … nice
  • Selectors: me like

I’m not quite sure what Anne is talking about when he says “Disappointed with the seemlingly proprietary extensions, never proposed in the relevant W3C Working Groups”. The only thing I can imagine is the HTC and COM part of the “Improved Namespace Support” section but those things does not seem any different than when Mozilla uses XUL-behaviors.

That’s it for me, looking forward to IE8. Although I will always love Firefox (Firebird … Phoenix … it’s been with me for so long) ♥

Gustav utan Gustav

4th of March, 2008

Läs ingressen så kommer ni att fatta bättre.

Garfield minus Garfield

X-UA-Compatible

24th of January, 2008

The more I read about it the more I disagree.

SearchPlay the Prototype way

22nd of November, 2007

A re-write of Dustin Diaz’s searchPlay but uses Prototype Object for class-based OOP.
Hides the form elements default value onFocus
and restores it onBlur unless you change the value.

/* Requirement: Prototype.js

 Usage:
 * new SearchPlay(“search_q”);
 * new SearchPlay(“search_within”);
	

*/

var SearchPlay = Class.create();
SearchPlay.prototype = {

initialize: function(element) { this.element = $(element); this.original_value = this.element.defaultValue; this.element.observe(“focus”, this.focus.bindAsEventListener(this)); this.element.observe(“blur”, this.blur.bindAsEventListener(this)); }, focus: function(event) { if ($F(this.element) == this.original_value) { this.element.value = ‘’; } }, blur: function() { if (!this.element.present()) { this.element.value = this.original_value; } }
};

Accordion

16th of November, 2007

Accordion

My version uses Prototype and is written using Prototype’s object for class-based OOP

Quite nice and short. I’m actually a little proud of it. :)

UPDATE: The menu (to the right of me) now uses the Accordion script. And, as soon as I can find a use for it, I will implement the DropDown script as well.

SVG Icons

4th of October, 2007

No I don’t have any news but I have a dream.

Wouldn’t it be zupercool if Firefox supported SVG Icons in it’s interface, resizable toolbars and other interface buttons.

That would be really cool, like you can do with Winamp, granted it looks real silly at 200% but it is really, really visible. :)

acts_as_attachment

18th of September, 2007

I have found the documentation for :db_system storage to be lacking.

Roger på IDG.se

22nd of August, 2007

Jag har, antagligen som många andra, både IDG:s nyhetsfeed och Roger Johanssons feed i Mozilla Thunderbird, så jag läser båda varje dag.

Igår så hade IDG en artikel om hur rika alla bloggare skulle kunna vara om det inte hade varit statistik dom presenterade.

Jag mailade länken till Roger och han bara skrattade. Tror jag behöver en reklamsäljare. blev kommentaren. Så här är mitt bidrag.

Eftersom man inte får tuta i sin egen lur, så tutar jag åt Roger, klicka på hans Google Adds

Jag gjorde det, vågar du?

Sen vill jag påpeka att han INTE har bett mig uppmana nån till detta, eftersom detta är emot Googles regler!

Firefox 3

21st of August, 2007

Det gäller att hålla sig uppdaterad! :)

Några nyheter i Firefox 3:

  • Stöd för display: inline-block
  • Stöd för display: inline-table, vad den nu gör?!

Saxat från Mozilla Developer Wiki

Midnattsloppet

19th of August, 2007

Ont i knäna men i övrigt så mår jag bra!

Mina resultat

Mera Godis i Firefox 3

14th of August, 2007

I senaste numret av Datormagazin så stod det egentligen inte så mkt om vad Firefox 3 skulle innehålla, mest att man kan använda online-tjänster offline. Det finns mer godis.

Arbetsmarknad ...

21st of June, 2007

Jag läste idag om att det kommer att fattas mellan 5 och 10 000 st IT-proffs inom en snar framtid.

Jag tänkte ta tillfället i akt och presentera mig själv:

Jag är ett IT-proffs, webbutvecklare heter det tydligen numera.

Skillz

  • PHP
  • (x)HTML
  • CSS
  • JavaScript
  • RubyOnRails
  • Gränsnitt och användarvänlighet

Har jobbat med

  • Java
  • XML/XSLT

Mitt mål brukar vara att de sidor jag arbetar med ska validera, både XHTML och CSS även om jag har vant mig vid att det är svårt att får CSS:en validera om man vill att sidan ska se likadan ut i alla webbläsare.

Jag är snabb på att lära mig och är intresserad av det mesta, även om jag föredrar gränssnittsdelen av webben.

Great Skate

4th of June, 2007

Nya shoppen är uppe och rullar!

Hur går det då?

3rd of May, 2007

Jovars det rullar på, jag har precis fått min F-skattesedel och ska hjälpa GreateSkate med nya webshoppen.

Why am I not posting?

17th of March, 2007

Well, I have taken a shine to CakePHP and I am thinking of moving this blog over to Cake and I am testing my way through the framework to see how to do it.
It’s really exiting and since I am big RubyOnRails fan Cake is even more exiting because I am soo much better at PHP than Ruby.

See ya as soon as I have built myself a wicked BlogModel. :)

I have a request for Google

6th of February, 2007

Wouldn’t it be awesome to be able to do a search for events taking place in a specific area on a specific day through Google, all they have to do is recognize Microformats and all everyone else has to do is to use them on their sites.

This should be so easy I can’t believe it hasn’t been done yet.

And for gods sake, try and make Geotagging a bit easier or at least gimme some more tools.
I can’t figure out how to convert all the different coordinates into the correct format.

Spam

31st of January, 2007

Due to excessive spam I am turning comments of for now.
They will be back when I have the energy to re-code the form.

SEO tävling

23rd of December, 2006

Tydligen så har SEO Kontroll en tävling med orden Aftonbladhet, Expressn, Svenska Dagbladhet och Internnetvärd.

Visst vore det roligt om jag hamnade högre än nån av dom bara genom denna artikel. ;-)

Näe, jag tror inte det heller och jag vill egentligen inte retas med kollegor men jag måste få testa.

QR Code

16th of November, 2006

This is so cool, there are so many, fun, things you could do with this.

Paste the town with stickers and let people figure out what they do.

You need to download the software for your cellphone first but once that is done you’re good to go. Find out more here…

Browser performance stats

31st of October, 2006

Zimbra has done some performance testing on both FF1.5, FF2.0, MSIE6 and MSIE7, interesting stuff.

Annoying

26th of October, 2006

What I find really annoying is when RSS feed aren’t built properly … get your dates straight idg.se

For every new article I get all the old ones with a new updated date (or published or whatever). It’s called spamming. And annoying.

Or maybe I should blame Mozilla Thunderbird for not being able to sort out the duplicates. Maybe that’ll be fixed in 2.0 whenever that arrives.

What ever … it bugs the hell out of me …

Bling duckie...

26th of October, 2006

I wanna buy the bling duckie but I can’t afford it … I wish I had a reason for you to buy me candy too

FF 2.0 spellchecker

25th of October, 2006

Only a small complaint, if I set the text area to Swedish and have the Swedish dictionary installed, I think the spell checker should switch to that dictionary and not force me to select it myself.

No biggie but that would make more sense.

Another complaint, if I change the language in one textarea the language in all textareas change but the text inside does not get parsed again.

Mozilla Firefox 2.0 released

25th of October, 2006

Lets see if the spell checker is working, well what do you know ...

anchious waiting

24th of October, 2006

Sitting waiting for FF2.0 … I know I can download it already but I’m waiting for the proper release.

Dreaming of simplicity

19th of October, 2006

Well kind of, this is just me wishing for an easier way of grouping css-rules.

My site is a hAtom

23rd of September, 2006

...just waiting to explode. :D

Technorati fumbles

8th of August, 2006

I like the idea of being able to send a page to technorati and getting a vcard back but it doesn't work.

I'm rebuilding things

20th of July, 2006

If you are interested you can preview it here but bare in mind that I am not finished.

The goal is to strip things down a bit so that the site doesn’t contain too much irrelevant bullshit. I am re-doing the right column! Rest assured.

Just had to share this

30th of June, 2006

Modern web design

@media 2006

13th of June, 2006

I'm of tomorrow, a bit nervous, a bit scared ... travel fever ... ;)

Testing my way through CSS3 selectors

15th of May, 2006

The page is a mess but if you check the CSS you'll find a whole lot of strange CSS3 mojo.

Just to show you how much fun you can have with CSS3.

Forgot the link: css3 selectors test page

Web 2.0

2nd of May, 2006

Not quite getting Web 2.0

Bit size standards

24th of April, 2006

Just when you thought no-one reads your comments someone surprises you:
bitesizestandards.com

Thanks for the link.

Where did my Design go?

4th of April, 2006

It's CSS Naked Day

What to put into your IE css

27th of March, 2006

Just a small tip, nothing major.

One more reason to love Firefox

9th of February, 2006

I haven’t checked the other popular browsers but this is one feature in Firefox that I really like.

A few weeks ago (on the 16th january) I downloaded some nice and free icons but the other day I realized that I couldn’t remember where from.
This is where Firefoxs download manager came to the rescue, find the downloaded file in the list, right-click and select properties: There you have it, the full url of the download.

In my case it was: http://famfamfam.madeserve1.co.uk/famfamfam_silk_icons_v012.zip which really wasn’t the website but after a two seconds on Google I found the site www.famfamfam.com, full of super-nice icons and flags.

So support the authors relaxing hobby and use his free icons, just make sure to give credit.

IE7 mayhem

1st of February, 2006

First of all I would like to take this opportunity to thank Microsoft for the amount of work the web developer/designer community will be given after the upcoming release of Internet Explorer 7.

Date constants

27th of January, 2006

These date constants are defined in PHP 5.1.1

Firefox free of charge??

24th of January, 2006

Just found a link to a page that offers Firefox free of charge.

How do you build your pages?

17th of January, 2006

After many years behind the keyboard something dawned on me ... maybe I should be more structured ... *gasp*

Roger writes about CSS3 selectors

11th of January, 2006

A really good article with examples and everything.

Validating a date using PHP

3rd of January, 2006

This is just a simple date validation function.

Cameron Moll sums up his year

20th of December, 2005

I like articles/how-tos, they make me so much better at using photoshop.

Firefox RSS icon in IE7

15th of December, 2005

Some very nice news from Microsoft and Mozilla.

Internet Explorer shows some strange behavior

14th of December, 2005

Internet Explorer is behaving very strange.

Firefoxs JavaScript Console

6th of December, 2005

More on the FF update

Have you updated Firefox yet?

1st of December, 2005

This is intended for those of you who has updated Mozilla Firefox to 1.5.

I use Google Analytics

24th of November, 2005

Since I got my own website I thought it would be cool to get some stats to go along with it and since Google offered Analytics for free I choose it.

Salute to the heroes

21st of November, 2005

A much needed salute and tribute to my heroes of the web.

Vill du veta hur jag har gjort?

17th of November, 2005

Jag tänkte att jag skulle berätta hur jag har valt att strukturera min XHTML.

Rubriksättning — A & O

16th of November, 2005

Om du vill att Google ska gilla dig så är det viktigt att du skriver bra och informativa rubriker.

  • Mats Lindblad
  • +46 (70) 249 11 24
  • Stockholm, Sweden
  • Geo: +59° 16' 12.53", +18° 7' 26.98"