Sidebar Menu

Projects

  • Dashboard
  • Research Project
  • Milestones
  • Repository
  • Tasks
  • Time Tracking
  • Designs
  • Forum
  • Users
  • Activities

Login

  • Login
  • Webmail
  • Admin
  • Downloads
  • Research

Twitter

Posts by stumathews
Stuart Mathews
  • Home
  • Blog
  • Code
  • Running
  • Gaming
  • Research
  • About
    • Portfolio
    • Info

Lessons learnt today

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
23.Jun
23 June 2011
Last Updated: 30 October 2015
Hits: 4512
grey-wolf-snow

I had a mixed day today. For one most of the day was was not particularly productive in terms of excitement which was mainly due to me having to figure out stuff which I didn’t know how it worked – so by trial and error.

Maybe i was a little bit agitated but I made myself apart of a argument which turned out and i realised was rather pointless – i was trying to disapprove a generalised statement that someone made, which by its nature cannot be accurate as a generalization cannot cover all areas and this was my point however I realised that he wasn’t really trying to prove his generalisation but express a subjective opinion. I do that sometimes and i hate it when people pedantically and correctly point out my mistake when basically i’m just trying to make a point. I should have realised this and not mentioned that he was inaccurate in conveying his point. Some would say that correcting anything is correct – i don't think it is, especially if it messes with a dude’s flow – if you know what i mean. 

The other strange thing I did today was get rather defensive about a comment that was not serious, and made a rather serious response which was a bit harsh because i meant it – i was frustrated. I immediately regretted because it wasn’t something i like to do, especially if it changes the atmosphere from fun to serious. The other thing is basically combined with the first lesson that is not to be pedantic and accurate so much so that you point out the mistakes of others as it makes others feel uncomfortable.

So a bit disappointed that i let those things slip but having said that, It was a glorious day and I found some pretty cool music on spotify which i starred and listened to on the way back home. The other intresting thing I did today which i did rather guiltily in the office was play around with a IRC c# library which connects to a IRC server, joins a room and shows all messages written by people in the room as messenger-style notifications so you can do real work(as i should’ve) and not have to worry about watching what people say in the chat room by having the chat window in the foreground. So that was a bit geeky.

Yesterday i went to watch Kung-Fu panda 2 with 3 friends which was cool. I enjoyed the conversation which was funny and the movie was ok but i expected it to be much better – sequel syndrome i suppose. I realise sometimes that I talk to much because I’m excited, especially if its funny – i’m like a child – its fun, its arkward but i noticed it. Today is Thursday and thats a good thing as tomorrow is Friday and the whole world is happier on a Friday!

Happy Thursday!

PS: The picture of the wolf? That’s my desktop background – had nothing else to put as a picture (and i pretty much like it)

if I had an extra hour, I'd...

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
20.Jun
20 June 2011
Last Updated: 30 October 2015
Hits: 4953

I came across a spectacularly funny piece of advertisement about getting an hour back in your day and if you got it back, what would you do with it. So if I had an extra hour in my day I'd,

Check if I can Moon walk from my desk at work to the fridge and back.

Press everything that I can see that has a button.

Arrange all my possessions by year I bought them in.

Order a Burger from Burger King using only catch phrases from Terminator movies.

Roll my chair around instead of walking around the office.

Think about the time I was epicly rejected at this club. Doh!

Listen to my old records, regretting my apparent lack of style.

Stare at someone until they look away first.

Twitch weirdly while in queue at the bank.

Try to be a secret agent, again.

Pretend to be a celeb and put on a cap and sunglasses and look mysterious.

Dance to no music in the mirror - Realise you look like a spastic octopus but carry on until you just can't do it to yourself anymore.

Use soneone else's phone to Send anonymous SMSs.

Think about my dress style when I was 17.


Not authorized to use this endpoint : RokTwittie

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
18.Jun
18 June 2011
Last Updated: 30 October 2015
Hits: 13380

Its broke.

One of the things that has irritated me ever since the internet began is our reliance on having our data elsewhere - not on our servers. The other is our reliance on 3rd party internet services as we cannot always say that they will always be up, their services won't change dramatically and break existing solutions which rely on past functionality.

I suppose the main point is that the internet service industry is not for those that see change as bad for maintainability. Expect change even though it sucks to!

I use a twitter module from rocket theme that allows me to use my twitter account to show detail to my users on my personal website. Recently twitter has changed the implementation of their service, more specifically the URLs that roktwittie uses to connect to twitter. So obviously this change is not good for roktwittie as it now doesn't work.

Rocket theme will fix the problem - if you pay them to. That means upgrading to the next version of roktwittie. I'm using version 0.9 release on the 15 Jan 2010.) Obviously, they wont tell you how to fix it yourself because then they wont get money for the potential upgrades. I say power to the user, if you can understand the fix, then do it yourself!

[div class="attention" class2="icon"] Backup your {joomla_root}/modules/mod_roktwittie/ folder just in case. If you don't and my programming sucks, too bad for you...[/div]

Fixing it

First you need to edit the file {joomla_root}/modules/mod_roktwittie/roktwittie.class.php:

First, on line 26, change this:

{codecitation class="brush: php; gutter: true;"}

"rate_limit" => "http://twitter.com/account/rate_limit_status.xml",
 		"status" => "http://twitter.com/users/show.xml?screen_name=",
 		"friends" => "http://twitter.com/statuses/friends/",
 		"messages" => "http://twitter.com/statuses/user_timeline/"{/codecitation}

to this

{codecitation class="brush: php; gutter: true;"}

"rate_limit" => "http://api.twitter.com/1/account/rate_limit_status.xml",
 		"status" => "http://api.twitter.com/1/statuses/followers/ids.xml?screen_name=",
 		"friends" => "http://api.twitter.com/1/friends/ids.json?screen_name=",
 		"messages" => "http://api.twitter.com/1/statuses/user_timeline/ids.xml?screen_name="

{/codecitation}

So we're basically just changing the url end points.

Then on line 97 comment out the first two lines of the checkError function, and then add a "return false;" at the end:

{codecitation class="brush: php; gutter: true;"}

//if (substr(\(string, 2, 3) != "xml") return "Data appears to be invalid.";

//else return false;

// make sure it always returns false

return false;{/codecitation}


Now on 249, change the following line from

{codecitation class="brush: php; gutter: true;"}
\)httpinfo = \(this->curl(\)this->url[\(type].\)user.((\(type != 'status') ? '.xml' : ''), \)this->raw_data);{/codecitation}
to

{codecitation class="brush: php; gutter: true;"}
\(httpinfo = \)this->curl(\(this->url[\)type].\(user.((\)type != 'status') ? '' : ''), \(this->raw_data);{/codecitation}

Which basically removes the .xml extension from the request to twitter.


And then finally comment out en entire if statement starting on line 252(starts with if (\)this->php_version < "5.1.3")):

{codecitation class="brush: php; gutter: true;"}
/*   if (\(this->php_version < "5.1.3") {   \)xml[\(count] = new JSimpleXML;   \)xml[\(count]->loadString(\)this->raw_data);       if (isset(\(xml[\)count]->document->error[0])) { return \(xml[\)count]->document->error[0]->data(); }       \(xml[\)count] = \(xml[\)count]->document;       switch (\(type) {   case "status": \)output[\(user] = \)this->parseStatus(\(xml[\)count]); break;   case "friends": \(output[\)user] = \(this->parseFriends(\)xml[\(count]); break;   case "messages": \)output[\(user] = \)this->parseMessages(\(xml[\)count]); break;   }       } else {   \(xml = simplexml_load_string(\)this->raw_data);   if (isset(\(xml->error)) { return (string)\)xml->error; }       switch (\(type) {   case "status": \)output[\(user] = \)this->parseStatus(\(xml); break;   case "friends": \)output[\(user] = \)this->parseFriends(\(xml); break;   case "messages": \)output[\(user] = \)this->parseMessages($xml); break;   }   }*/{/codecitation}


And then your roktwittie should be working. Or mine is :-)

interesting

More Articles …

  1. Java Exams
  2. Slowly
  3. Ha-tissue
  4. Bowling me right over
  5. Being wrong
  6. Motion detection & Jarvis
  7. Why stars die
  8. Blink182
  9. Wednesdays are cooler
  10. Randomly
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116

Page 112 of 182

Blog RSS Feed