Share Shirish&039; Journal on Facebook
rss
…where my Id, Ego and Anima come out to play.
Page 3 of 10...« Last«54321»

[FIX] Last.fm for Wordpress – “Warning: gzinflate() [function.gzinflate]: data error…”

| Posted in The Usual |

0

When I first tried the Last.fm for Wordpress plugin with this Wordpress 2.8.4 installation, I received the following error :

Warning: gzinflate() [function.gzinflate]: data error in /hermes/web07/b2563/blah/blah/wp/wp-includes/http.php on line 1787

The Wordpress plugin page mentions that the plugin is compatible up to WordPress 2.7.

After checking out the code in the plugin file (/wp/wp-content/plugins/lastfm-for-wordpress/lastfm.php), I was able to determine that there was something wrong with the fetch_rss() function. Using that function caused the above warning to be displayed. Wordpress Function Reference mentions that the function has been deprecated, but it should still work to enable backwards compatibility. The suggestion given on that page was to use the fetch_feed, which seems pretty straightforward. But I chose to do some more digging.

I googled the problem to try and figure out what was wrong. The most common solution I found recommended editing the http.php file (/wp/wp-includes/http.php) and altering line 1787. I think it was also accepted as a bug in Wordpress and will be rectified in Wordpress 2.9 (out now). But anyway, one thing I’ve learnt from my previous Wordpress updates — Never alter code in core files. I lost all my “custom modifications” when I upgraded to 2.8. I’ve learnt to write maintainable code the hard way. :P

It’ll take a few weeks for me to make up my mind to update WP. Until then, the mod should work just fine.

To sum up the mods I’ve made to the original plugin file for it to work with my Wordpress 2.8 installtion -

  • Changed fetch_rss() implementation to the new fetch_feed() implementation. Uses the SimplePie and FeedCache functionality for retrieval and parsing and automatic caching, instead of MagpieRSS and RSSCache.
  • Commented out MagpieRSS settings variables.
  • Removed line 131; wonder what it was there for.

$songs = fetch_rss(‘http://ws.audioscrobbler.com/1.0/user/’.$username.’/recenttracks.rss’);

Download here or See full plugin code.

NO WARRANTY OR SUPPORT PROVIDED. USE AT YOUR OWN RISK.

CREDIT TO ORIGINAL PLUGIN AUTHOR : Ricardo González

UPDATE: I still see the gzinflate error occasionally.

2010, The New, Friends, Deadlines

| Posted in The Usual |

0

I’m sure some of these posts make me come off as a super-geek. It’s true to some extent and I can’t deny it, but if you really pay attention, you’ll see that while I appear to be a super-geek, I’m much dumber than the average super-geek. For some mad reason, I find it more sensible to do practical things rather than learn about the theory behind uninteresting subjects. That rebellious cog-wheel in my brain refuses to acknowledge the importance of a syllabus set by some institution. I mean, who are they to decide what interests me, or what I need to learn?. It’s hard for me to cope with college and lectures; to some extent, it’s against my practical-oriented nature, and most of what they teach is uninteresting rubbish.

As a kid, I had a theory (more of an excuse) that the brain has an information holding capacity, and as I read and learned more about things, it diminished my brain’s information holding capacity. My excuse for not studying hard was that it might cause my brain to fill up with too much information and force it to push out other very critical information, such as how to eat food and how to drink water! Of course, no one bought my theory, but everyone found it hilarious. Another theory was that it was bad luck to study after 10 PM. I’ve seldom studied in my school life after 10 PM. Citing a few crazy examples, the theory suggested that my mind was tuned to have dinner at 10 PM while watching TV and go off to sleep at 11-11:30 PM. I used to finish eating dinner pretty quickly and watch TV till 11. Anyway, according to the theory, any change in this routine would have severe effects on the morning after. Again, no one believed me; but I loved coming up with these crazy theories. Looking back, I always have a good laugh at my crazy childhood days. Building tents with bedsheets in my room with lots of soft pillows stacked in them; I’ve always been a fan of a comfortable, cosy life. I’ll do almost anything to get me one of those.

I try very hard to be an average student, and I also try very hard at NOT being an above-average student. It’s a modern theory I came up with in Junior College that’s stuck around for a long time. After the 9th standard, I’ve never showed up in the top 5, and I never wanted to. “The more the grades, the harder it is to enjoy life”.

Things that got done before the Jan 5th deadline -

  • Released “FileLister”
  • Created a Facebook-app-bar like JS bar.
  • Code version control, SVN
  • Worked on jQuery Selectable
  • “Integrated” Wordpress posts into Joomla! (with AJAX loading)
  • Fixed “Last.fm for Wordpress” plugin issues, and released my first ever open-source code. Good to be part of the open-source family.
  • Wrote code to list out Wordpress’ recent private post titles
  • Integrate Facebook feed into website and blog
  • OpenID login for Joomla!
  • Windows 7

Things that couldn’t get done -

Reason: Motherboard died. Say hello to the new Gigabyte motherboard!

Gigabyte EG-45M-UD2H

Gigabyte EG-45M-UD2H

The Exploration of Space

| Posted in The Usual |

0

Space: The final frontier

Space -noun: Freedom or opportunity to express oneself, resolve a personal difficulty, be alone, etc.; allowance, understanding, or non-interference: e.g. Right now, you can help by giving me some space.

I’ve managed to piss off more people in the past few weeks than ever before. And it pleases me. I’m celebrating my solitude. The last few weeks have been absolutely wonderful, especially with Bro here. Family time. I think we all got a feeling that we were experiencing some ‘real family time’ this time. Things had never been so much fun with family in the recent past. Amazing thing is, we did nothing. Like lazy afternoons fleeting away quickly, the last few weeks have been very relaxing. I put off projects, got rid of my Internet routine, disconnected myself from the world almost completely, and just paid attention to what was around me.

I think it’s greatly important to take such pauses in life. Re-evaluate.

I started disconnecting myself from the Internet and the Cellphone long before Bro arrived. At first, I was afraid it would harm some of my ties with people. Then it just felt great. Complete relaxation. I had the perfect amount of sometimes much needed external intrusion in the form of a lovely friend.  It’s weird how I could just disappear and reappear without changing anything. It’s not my talent; kudos to this person for putting up with my non-sense. My much needed non-sense. A few weeks into my period of solitude, I was afraid some ties might break,  but I felt that if this person can put up with me, my close friends shouldn’t have a problem. There wasn’t much going on that would allow me to call up people and talk to them either. There just wasn’t anything to talk about at my end. Not too much has changed in my life since the beginning of this year, apart from the inclusion of some very interesting characters.

But my unsociable behaviour has drawn not just anger and disappointment from others. It’s helped me earn a lot of laughs too. Some people find the reclusive aspect of my nature funny, while certain others seem to relate to it. I don’t think I’m anti-social; I’m just reclusive. A lot of social aspects and formalities discomfort me.

By nature, I tend to be a no non-sense “regular”, “average” guy. I try very hard to be “real”. Practical. Some perceive that as “serious” nature. I have a strong tendency to skip aspects of social niceties, and jump straight to the point I honestly want to put across. What that means is – no sweet-talk, no flattery, get-to-the-point kind of behaviour, that doesn’t leave a good impression on people. I’m not a showman. I cannot recite stories or incidents in an interesting manner. I won’t even try. The fact of the matter is, I’m not trying to impress you. You’ll come across many people trying to impress you. I’m not one of them. I tell it like it is; the way I perceive it. Totally uninteresting stories. At home, however, I’m the exact opposite of “practical”. I’m goofy!.

Another peculiar thing about the way I manage relationships is that I seldom pull favours. I don’t ask for favours, unless there’s absolutely no other way in the world to get the task done. I might start a conversation with “I need a  favour”, but if you pay attention, you’ll realize that I’m not really asking you for a favour (unless I am!). It might be something petty, and I’d only ask for it if it was convenient for you, or you already owe me a favour. If you’ve done me a favour, I’ll “return the favour” as soon as humanly possible. Favours are excess baggage. I regard them to be very tricky, although others believe it’s included in the social contract they have with the other person. My social contracts are separate from the favours I give or ask. Usually, only the people close to me can pull off big favours from me. My nod to do the favour largely depends on my convenience, my inclination to help the person, and also the list of favours I’ve already done for this person. Every person gets a limited no. of favours, and as soon as someone is spotted asking for more than his/her quota, a mental note is made. That particular relationship then begins fading away. It’s actually happened with a few friends. It’s a fair system.

I guess a very important aspect of being great at relationships is your ability to present your thoughts and ideas. Well, for me, it’s critical for me to be able to impress myself. Anyone else is secondary. I don’t see what’s wrong with being reclusive. Folks who do great socially tend to frown upon people like me; or at least that’s the impression I get. There’s nothing wrong with being shady. I feel those who’re too socially active needlessly subject themselves to a lot of pressure. Sooner or later those social connections will make or break you.

I’m not sure when this solitary style of living will come to and end. For now, it feels great. There just might be a major revamp of social connections on the horizon.

TO DO

| Posted in The Usual |

0

  1. Complete Grails; brush up on JDBC w/ MySQL.
  2. Learn code version control. CollabNet Subversion.
  3. Release “FileLister”  :P
  4. Create a Facebook-app-bar like JS bar.
  5. Learn to integrate Facebook into business websites; explore OpenID.
  6. Experience Windows 7.

Ex-tro-spec-ti-on

| Posted in The Usual |

0

I’ve had a cavity for the last few weeks, but did not go to the dentist since my exams were on. After discovering the cavity hole had grown considerably large yesterday, I visited the dentist today. I was kind of hoping that I would wake up one day and the pain would simply be gone. A few times on some days it even felt as if the pain had indeed vanished. I’d wake up, brush my teeth and suddenly find that the pain had disappeared. It would dawn on me a few moments later after having a sip of water that nothing had changed, and I’d spend the next few seconds trying to deal with the pain.

I hate my dentist. I guess I hold that sentiment towards all dentists, but who knows, there might be some pain-free dentists out there who graciously give out pain medication. A dear friend who’s pursuing a career in dental care recently showed surprise when I told her I felt pain each time my dentist poked an instrument into my mouth, especially the tiny drill. I asked her how many root-canals she had experienced in her life. Her answer – none. That just appalled me. She hadn’t experienced the distinct pain one goes through when undergoing a root-canal procedure, and the horrifying pain that lingers on hours after a simple cavity removal procedure is over with. She’s probably on her way to be precisely like dentists who aren’t gracious with pain meds, since she hasn’t experienced the pain.

Life sucks when your tooth aches. It really does. I spent an hour in pain, thinking the pain would go away by itself, but it didn’t. The dentist simply drilled a little to remove the problematic cavity, but he later found the cavity had affected too much of my tooth, and a root-canal procedure had to be done. The pain started really slowly. On my way home, I had tears in my eyes, but it wasn’t the kind of pain that would make me burst into tears. It was thumping pain. For one moment, it would be excruciating, in the other, it would disappear. Really annoying. As I walked back home, some people even gave me a concerned look, the kind that says, “I want to ask you what’s wrong, but can’t because I don’t know you”. I just wanted to get home as soon as possible.

Once I got home, my outlook on life changed. I’ve loved my life for a long time now. Excluding the odd complaining and whining, overall, it’s been great. This pain just drove all the happy thoughts away. I tried to divert my attention from the pain by trying to think of happy moments. Nothing came to mind. All I could think of was the pain in my mouth, and the thumping pain in my head. I felt like ripping the tooth out of my mouth, or running back to the dentist to have it removed or numbed, or knocking the pain centre in the head out cold with some pain-killers. The first option I could not perform (obviously), the second option was doable, but would require me to bear with the pain from my home till the dentist again looking at concerned faces, The third option was what Mom suggested, so that’s exactly what I did.

I don’t have any memory of needing pain meds as badly as I did today. Much to my dismay, I realized for the first time that it takes 30-40mins for them to work. I’m talking about prescribed pain medication. I had to bear pain for 40 mins until it slowly began going away. Until then, my head was filled with thoughts that made me see how totally sucky life is. A few days ago I had a heart-felt talk with a close-friend about how amazing life is, and I responded pretty well to every argument she made about it being sucky. In a matter of seconds, all of her thoughts flooded through my mind and all I could think of was how right she was. It also gave me an estimate of how much pain she was feeling. Unbearable.

So there you have it. You cannot form and give your opinion on how great or lousy life really is, since it’s almost like a theme-park ride that make you scream with joy or scream out of fear. Life isn’t good.

When on pain-killers, Life isn’t bad.


Page 3 of 10...« Last«54321»