Warning: Undefined variable $page in /home/public/wp-content/themes/timoliver-2014/header.php on line 9

Warning: Attempt to read property "ID" on null in /home/public/wp-content/themes/timoliver-2014/header.php on line 9
Tech |

Posts for 'Tech'


Futzing with WordPress’ base directory

March 31, 2010 •

The list of files in my hosted spaces root directory. I'm discussing how I set up requests to go to these directories. XDA few blog posts ago, when I wrote about the online version of my regex tester, I mentioned that I was experiencing a few technical troubles on my blog. The reason for this was that the regex tester is kept in the same web space as my blog, and the way I had set it up was causing erroneous functions in WordPress.

After a bit of googling and some .htaccess hackery, I got it all working again. Since it was a bit of an interesting concept and solution, I thought I’d write it up here. ๐Ÿ˜€

So, I have one main block of web space that I use for all of my websites, which is hosted by the fine people at Ennoverse.com (*plug plug* XD). The primary domain for the space is Tim-Oliver.com which directs to the root directory of the space and originally, the directory contained all of my blog WordPress files.

When I went to set up Regex-Tester.com, I decided I didn’t want the files and directories from my blog to mix with those of the regex site. To do this, I placed all of the blog files into a directory called ‘/blog’ and all of the regex files in a directory called ‘/regex’. I then simply set the Regex-Tester.com domain as a subdomain which directed straight to the ‘/regex’ directory after that.

Now, herein lay the dilemma:

Continue reading

Regex Tester, online and now with AJAX!

March 9, 2010 •

Regex-Tester.com - Online version of TiM's Regex TesterWhew. Sorry about that. I was doing some server maintenance in preparation for this new system and I inadvertently broke the backend of my blog. It’sย  still a bit hinky here and there, but thankfully we can now return you to your regular program. XD

So, I bought the domain (STILL can’t believe it was still free haha), and then spent a good chunk of the weekend getting it all working. ๐Ÿ™‚
As a follow-up to the regex tester script I wrote and released last week, I’ve now created an online version, free for all to use anytime!ย  ^_^

So, presenting: http://www.regex-tester.com/

If you were wanting to test out the last script but couldn’t set it up locally, you can try it out online now. ๐Ÿ™‚

In contrast to the last versions, I modified this one quite a bit:

-Broken up the JavaScript, CSS and PHP into separate files for easier reading/editing.
-Rewrote the JavaScript code using jQuery (Soo much cleaner).
-Added AJAX functionality so the page doesn’t have to refresh each time.
-Added a couple of default regex strings to get you started.

So feel free to use it at your leisure! Depending on my situation, I’ll probably wind up using this one more often than the offline version.
If you do have any suggestions on how to improve it, be sure to check out the UserVoice page as well.

Enjoy!

Well I might let you get back to it then hehe. ๐Ÿ™‚
I just saw you online for the first time and thought I

/Regular Expression[s] Script!/

March 1, 2010 •

TiM's Regex Tester after a successful query.I think it’s fair to say that since graduating from univeristy, I’ve wound up doing a LOT of web development. XD

With heaps of small-time client work, building dynamic web apps at a company in Japan as well as pimping out and maintaining WesternAustralia.com for Tourism WA, and now developing for several web apps and web sites at ECU… so far it’s looking pretty diverse hehe. But in any case, I’m totally not complaining here; I love every minute of it! ๐Ÿ˜€

One thing I’ve found myself doing quite a lot of recently however is content migration. A lot of my work revolves around content management systems, and when it comes to upgrading to a new platform, it usually means having to copy the blocks of text/code out of the old one, re-twiddle any custom tags or syntax inside it, and then paste it into the new one.

But that being said, I quickly discovered a tool which eased the pain significantly: regular expressions! (Or regex, after you get tired of saying regular expressions all the time hehe XD)

Continue reading

The iPad… hmmm

January 28, 2010 •

The iPadWell, after months of rumor and speculation, it finally got announced last night… Apple’s iPad.

But right from the get-go, sadly, I’ve found the whole thing totally underwhelming. I was expecting this thing to be totally awesome and to totally blow my world apart like the iPhone did… but sadly not so much.

Firstly is the name. I was really disappointed that they called it iPad. It is just too close to iPod. Period.With so many people out there, all with different and unique accents, I can so see myself having to clarify iPod and iPad at least once. ๐Ÿ™

In addition, as per the Twitter feed, I’ve noticed a lot of people think it sounds very much like a tampon name as well, which definitely isn’t helping (Possibly the Wii all over again XD)
I’m not sure what the branding marketing strategy was behind that, but it failed. Epically. The rumored name that was floating around ‘iSlate’ sounded so much cooler, and definitely did not suffer any of the above problems. XD

Continue reading

Steam and Digital Distribution

January 12, 2010 •

List of Steam games

So just for those of you who missed it, Steam had a holiday sale over the Christmas holidays where they sold the majority of their games catalog at price discounts of up to 75% off.
Me being the stickler for bargains that I am, I couldn’t resist and bought every game I had been holding out for at that time. I probably spent something like 150 bucks, but I ended up with over 100 new games in my account. And these weren’t just small indie or casual games, either. I’m really looking forward to trying out Prototype, GRAW and Arkham Asylum… after I’ve finished playing Dragon Age. ^_^

So while I was settling down to playing my new games, I started to actually ponder the concept of digital distribution a little bit. I was feeling a lot happier and excited about getting and playing these games that I had downloaded, rather than bought from a store and was trying to figure out why.
I guess in its simplest form, it’s merely just buying digital content online and downloading it to your hard drive, as opposed to going to a shop and buying the exact same data on a physical form of media. On it’s own, this seems pretty uninspiring, so I started to think more about why I was feeling more satisfied about it. Here are some of the reasons I came up with.

Continue reading

MySQL + phpMyAdmin Backups = fail

March 4, 2009 •

The System is DownSo… my father often says to me that you shouldn’t make mistakes yourself. You should watch as the people around you make mistakes and learn from them what not to do. That clearly wasn’t the case here. >_<

This is the story of what I’ve been doing in the past 3 days hehe. I’ve been trying to migrate all of the content from our old mod, RPG-X’s forum, to the new UberGames forum me and some friends have been working on. The reasoning for this is to consolidate resources as well as effort.

So, before the migration, I got phpMyAdmin to dump the UberGames forum to a big SQL source file (roughly 30MB worth of letters ) and stored it on my hard drive, and then installed the upgrade script.

My first mistake, I didn’t Read The Flippity Manual (RTFM btw), and I executed the upgrade script from the wrong entry point. This subsequently made the script confused about what system the UG forum was (It figured it was Invision in the end O_o ) and subsequently corrupted several tables in the process. This wasn’t too bad as the tables were really small, and I pasted the data back in from my backup.

Now the colossal fail. Once I’d sorted out the import script and executed it in vBulletin mode, the forum looked like it just exploded. In the process, a whole pile of data mingled as well (ie my account got overwritten by RedTechie’s…? O_o ) and I’m still wondering if that was my fault, or some residual glitches from before.

Sadly… and here’s the kicker, when I went to revert the database, not only did it remove the RPG-X stuff, but it deleted a whole pile of UberGames posts with it, as well as all of the admin accounts, which meant I was no longer logged in… and it kind of collapsed in on itself. XP

Sooo….. I realised I had no choice but to restore the entire SQL database I made, since by this point, the database was riddled with corrupted tables.
At this point, I found out I couldn’t just feed the data back into phpMyAdmin, because it was too big and caused timeouts.

So, RedTechie suggested I go and find a script that handles staggered MySQL queries, and use that. Thankfully, I found an awesome one called BigDump (http://www.ozerov.de/bigdump.php).

And now… icing on the cake, BigDump refused to load my file because it was encoded wrong. Turns out it can’t handle INSERT queries that try to insert all of the data at once… something called extended inserts.

So… long story short, I’ve spent up until now, writing a utlity in C# .NET that could take my SQL file, resequence it into 1 on 1 insertion queries and then debugged it until it worked.

What was meant to be an easy 4 hour task has dragged onto 3 days. Ugh…
I guess I should be happy I learnt a tonne of new stuff in the meanwhile… but I’m not so sure.

So the moral of this story is:
1) ALWAYS (!!!) RTFM!!!!!!!! No matter how simple something looks, there’s always a way to screw it up.
2) When exporting SQL from phpMyAdmin, make sure to uncheck the ‘extended inserts’ checkbox.
3) Test backup restoration before assuming it’ll just work.
4) Save the alcohol-based celebrations until after it works. XD

So yeah…. the forum’s all back online, and I’ve taken proper backups now… so I’m ready to try again haha.

In the meantime, I might also release my ‘SQL Splitter’ program as well, in case anyone else runs into the same problem I had…