Apache/XAMPP + Skype

Category: Development

Just a quick note that I always forget. If you’re doing web development on a machine that has Skype, make sure you go Tools -> Options -> Advanced -> Connections and untick the “Skype uses port 80 & 443″ option.

Otherwise Skype will use those ports meaning Apache wont be able to start without rebinding to another port (which is annoying).

No comments

Lava Lamp

Category: Off-topic

I ordered a lava lamp for work today. It’s not my fault, my coworker pressured me into getting it. Not really, but I am surprised I’m looking forward to it.

Ever played Rollercoaster Tycoon? I loved #1 and #2, and #3 was good. But #2 is my favourite much like OpenTTD is a favourite game of mine. That’s the thing that RCT3 lost from 2 & 1, it lost those 2d 8bit type graphics. There’s just something about those games that are a lot of fun. RCT just doesn’t really work in 3d glory.

Anyway, I ordered RCT2 and hopefully it arrives soon. It was cheap, but I’m looking forward to it. Every day I come home and it’s not here I go to bed a little sadder than normal (not really, but I like to imagine I do).

Will have to post some screenshots when it arrives. Btw, secret santa recipient of mine, I’m so sorry I’ve still not sent my gift. I promise I will! I really do. It’s only… 4 or so months late.

Yeah…

No comments

Comment Switching

Category: Development

Just a comment block I find useful when testing.

/*
echo $query;
exit;
/*/
$run = execute_query($query);
//*/

Here there are two sections, the top section (the echo $query) is for debugging purposes when I  just want to halt the script there. The second section is the actual script to run.

I want to switch between the two, but I don’t use any fancy debugging software. Rather than continually comment out each section, I use this.

You switch between by the /*

on the first line. To activate, add a / to the front of that.

//*
echo $query;
exit;
/*/
$run = execute_query($query);
//*/

What happens is you actually create a toggle. When you have // at the start, you’re commenting out the start of the first comment, so the echo $query is no longer commented. However the second comment tag, /*/ now picks up and is a new start comment tag.
It then comments everything out until the last comment tag //*/ which is a global ender (it will be the last comment tag overall).

My syntax highlighter doesn’t exactly pick up on the comment complexity here, but it works fine in my editor.

Screenshot of the first block active.

Screenshot of the second block active.

Useful to none, interesting to me.

1 Comment

Manners Mall Bus Route

Category: Off-topic

My main method of transportation these days is the bus. I’m lucky enough to live in a city that has a pretty good public transportation system, I can catch the bus from my house all the way to the doorstep at work in the city. The method of getting on and off the buses is quick and efficient too, tapping your Snapper card against the reader and you’re done.

There has been some debate and drama recently in Wellington over the new bus route through Manners Mall (article is frmo 2009 when the topic was first raised). Previously the mall was a pedestrian-only area, vehicles did not have access.

Now work has completed and the bus lane has opened, with more drama over the width of the lanes (they’re apparently too narrow, so the buses are very close to each other going down it) as well as the safety of pedestrians. There were predictions that people will be knocked down and possibly seriously injured by buses travelling down the new route.

Sadly, the predictions came true pretty quickly.

One of the major issues is people. You need to look both ways before crossing a street, especially one with buses travelling down. The trolley buses are quiet, you don’t hear them coming until it is too late. People need to take responsibility when crossing the road, you shouldn’t be hit if you’re watching and crossing safely.

But the issue isn’t just with pedestrians not looking, the bus drivers themselves share part of the blame. I’ve been using Wellington’s bus system for the past 6 months down, pretty much daily (on weekdays) during peak times (morning & evening) and during that time I’ve noticed a few things.

An orange traffic light means you must slow down. If you’re approaching an orange light and you can stop safely, you must. Too many times though the bus will then put their foot down and motor through the lights and in some cases they will cross the final stretch as the lights have changed red and the other direction has been given the green light. It may be the pressure to get people to their destination on time, but I wouldn’t think that need would supersede the road rules.

Speeding is also a problem, some of the buses motor around the city and speeds that are definitely not legal. Of course, cars also do this quite frequently which is an issue. But in the centre of town where the limit is 30kmph, it’s unacceptable to go any faster.

In the end I don’t think the new route was a success. Wellington destroyed an awesome pedestrian mall to save some time on the commute into town.

1 Comment

Post Queue Plugin

Category: Development

It’s really annoying when someone starts a sentence with “I want”, because it does sound self-centred. But it can’t be helped in this case.

I want a plugin that queues posts in WordPress and then publishes them at scheduled intervals. I should be able to write a post, hit publish and know that it will then drop into a queue and be pushed out at the set interval.

The point behind it is I could then write when I want, as many times as I want, and queue content up to go out every couple of days. It could be used with multiple authors, and done to make sure the content going out is balanced. It could randomly decide which post goes out so you never really know what’s going to go out until it does.

WordPress does have the built in “scheduled posts” feature, but the trouble there is you specifically have to pick a date and time to have the post go out. I don’t want that, I want to be able to just hit publish and then let the plugin handle all of the timing.

I did do a search for existing plugins, and I did come across the Automatic Post Scheduler, which is pretty similar to what I want. The difference though is it will basically utilize the scheduled timer on posts and just set it to a time that’s the next in the series. My goal is a plugin that doesn’t schedule them when created, rather queues them. This way multiple authors can post in a queue, it can equally distribute the posts out, and they can be shunted around in any order as we want.

Since I’ve been getting into the plugin development side of things with WordPress a lot more these past couple of months, I may give it a go and see if I can come up with something. I don’t want to reinvent the wheel if it already exists, but if it doesn’t then it’s good to give it a go.

We’ll see.

3 Comments

Christmas

Category: Off-topic

You better watch out
You better not cry
Better not pout
I’m telling you why

Santa Claus is coming to town!

I don’t know why, but I’ve always found that song creepy. Take away the catchy jingle behind it and look at the lyrics. He’s coming, you need to beware. He watches you when you’re asleep and he knows when you’re awake. He knows if you’ve been naughty or good (I wonder what his definition of “good” is, since it’s all subjective).

This year I’m excited for Christmas, as I get to go home again. I live 2 hours away from where I grew up, and that’s not far to travel, I rarely go back except for the odd visit. But Christmas is always a big deal in our immediate family, and it would be a crime to miss it.

One thing I don’t miss or get excited for are the Christmas movies. They bring out the same tired rubbish each year at this time. Why are Christmas movies so cheesy? Why are the so… American?

New Zealand has Christmas in the summer. It’s more common to cook our Christmas dinners on the barbecue than in the oven. Yet our pictures of Christmas are the snow covered fields, while everyone gathers around the open fire to roast chestnuts.

Not to mention the end of every Christmas movie/TV special: “Look, it’s snowing”. Snow in winter, big deal. Now if we walked outside and it was snowing,  I’d definitely be calling that a miracle. Snow in summer, there’s a skill.

No comments

Are You Being Served?

Category: Off-topic

Random browsing found this, the theme to “Are You Being Served?” in dance-mix form.

Watch this video on YouTube.

It’s awesome.

No comments

Nothing in particular

Category: Off-topic

Some people wait until New Years Day to make their resolutions and change their lives. It’s that one day of the year where things shift and so you feel like you can get a fresh start by ditching the previous year. Of course this ultimately is a never-ending cycle as a new year shows up like clockwork.

This isn’t exactly a fresh start, it’s a clean wipe. So here’s some pictures.

Brenda (TV)

Brenda the TV

Meet Brenda. Brenda is a television. Brenda is my television. She’s named after no particular person for no reason other than the fact that she needed a name.

Steve (DVD Player)

Steve the Sound System + DVD Player

Meet Steve. Steve is a combination DVD player and surround system. He and Brenda both work together to bring the full entertainment experience.

I named both of them after buying, simply because I wanted to. There doesn’t need to be any other explanation for it.

Blade (Dog)

Blade manages to pose pretty well.

This is Blade. He’s my family’s dog and we’ve had him since he was a tiny little puppy. He poses pretty well, unfortunately Saffy can’t do the same so the best picture I had was this:

Blade and Saffy (Dogs)

Blade, Saffy and a bone

They came down for a visit this weekend, which was awesome. What’s funny is even though the bone is in the picture (it’s not theirs), neither of them cared enough about it to do anything.

One last photo.

Toy Story 3 DVD + Placemats

Toy Story 3

This is a picture of Toy Story 3. I absolutely loved the first two movies (they came out when I was younger) and the third one was pure brilliance. So when the DVD was released I had to have it. It came with free 3D place mats, how cool is that? (Come on, they’re free and they’re awesome. Of course I wanted them!)

There really was no point to this post. Something random to pass the time. With pictures!

No comments