12
Nov/09
2

How to upgrade PHP in Ubuntu

I decided to upgrade my PHP version as part of my Moodle 2.0 install. It wasn’t easy. Here’s the answer:

Step 1 – Update and Upgrade your existing software repositories
sudo apt-get update
sudo apt-get upgrade

Step 2 – Add some extra repositories so you can get the latest version
sudo nano /etc/apt/sources.list

Then add the following to that file, and save it:

deb http://http.us.debian.org/debian stable all
deb http://security.debian.org/ stable/updates main contrib
deb http://packages.dotdeb.org/ stable all

Step 3: Update your new repositories
sudo apt-get update

(I got some 404 errors with this step, but you can ignore them)

Step 4: Install the latest version of php
sudo apt-get install php5-cli

Step 5: Restart Apache
sudo /etc/init.d/apache2 restart

Filed under: How To, Tech
12
Nov/09
0

Install Moodle 2.0 on PHP 5.2.0 or higher

While installing Moodle 2.0, I ran into a little problem. It says that it requires a minimum PHP version of 5.2.8 – but I was running 5.2.6. Updating PHP in Ubuntu is a pain in the bum, so instead, I used this little hack.

A quick look at the source for install.php reveals this on line 489:

$version_fail = (version_compare(phpversion(), “5.2.8″) < 0);

If you just change 5.2.8 to your version (in my case, 5.2.6), it will install. There aren’t heaps of changes between these two versions, so I’m hoping there won’t be any major side effects!

Filed under: How To, Tech
23
Jul/09
0

No Address Bar Chrome on Google Latitude for iPhone

Before you ask…

Here’s how to add Google Latitude to your iPhone as a web clip without Mobile Safari’s top and bottom navigation bars.

  1. On your iPhone, go to http://carbis.fu8.com/iPhone/latitude (the capital ‘P’ matters)
  2. Before you are redirected to the latitude page, quickly press the + button, and press Add to Home Screen
  3. If the icon loads with a black background, you didn’t quite get it before it redirected – try again
  4. Press Add in the top right hand corner

And that’s that. You’ll notice I also edited the ugly Latitude home screen icon so that it matches all of Google’s other web apps.

Hope you like. :D

Filed under: How To, Tech
24
Jun/09
1

How to use Google Apps Chat in Beejive / Adium / Pidgin

… or any third party instant messaging client for that matter. So that you can use Google Talk on your Google Apps domain on your iPhone (through Beejive or IM+), or through your instant messaging client of choice. Even iChat!

First of all, you’ll need to update your SRV records. Don’t worry if you’ve never heard of them before, it’s really easy. Log into your domain control, and, in the same way you would add DNS records, add the following SRV records (replacing domain.com with your domain):

_xmpp-server._tcp.domain.com. IN SRV 5 0 5269 xmpp-server.l.google.com.
_xmpp-server._tcp.domain.com. IN SRV 20 0 5269 xmpp-server1.l.google.com.
_xmpp-server._tcp.domain.com. IN SRV 20 0 5269 xmpp-server2.l.google.com.
_xmpp-server._tcp.domain.com. IN SRV 20 0 5269 xmpp-server3.l.google.com.
_xmpp-server._tcp.domain.com. IN SRV 20 0 5269 xmpp-server4.l.google.com.
_jabber._tcp.gmail.domain. IN SRV 5 0 5269 xmpp-server.l.google.com.
_jabber._tcp.gmail.domain. IN SRV 20 0 5269 xmpp-server1.l.google.com.
_jabber._tcp.gmail.domain. IN SRV 20 0 5269 xmpp-server2.l.google.com.
_jabber._tcp.gmail.domain. IN SRV 20 0 5269 xmpp-server3.l.google.com.
_jabber._tcp.gmail.domain. IN SRV 20 0 5269 xmpp-server4.l.google.com.

_xmpp-client._tcp.domain.com. IN SRV 5 0 5222 xmpp-server.l.google.com.
_xmpp-client._tcp.domain.com. IN SRV 20 0 5222 xmpp-server1.l.google.com.
_xmpp-client._tcp.domain.com. IN SRV 20 0 5222 xmpp-server2.l.google.com.
_xmpp-client._tcp.domain.com. IN SRV 20 0 5222 xmpp-server3.l.google.com.
_xmpp-client._tcp.domain.com. IN SRV 20 0 5222 xmpp-server4.l.google.com.

The last five are the most important, and they’re not included in Google’s article on the topic. They are the part that lets you log in from a different instant messaging client.

Next, just add a Google Talk account, with the username being ‘username@yourdomain.com’ . It should all be good from there.

Let me know how you go, if this works for you (or if it doesn’t).

Filed under: How To, Tech
15
Jun/09
2

Post a tweet from an anchor link!

Wow! You’ve heard of mailto: links that automatically launch your mail client, and iTunes links that open the iTunes music store, but did you know that you could make a link that posts a tweet on twitter!

I discovered it when learning about Fussy Follow Friday on Matt Stratton’s blog.

First, an example: Click here to tweet!

And now, here’s some html how-to goodness:

<a href=”http://twitter.com/home?status=type twitter status here“>Click me!</a>

Of course, if you’re not signed into twitter, it will ask you to sign in first… but if you are signed in, it will post automatically.

Filed under: How To, Tech
30
Apr/09
3

Custom iTunes Genre Art and Language Names

Today I decided to make a custom genre icon for all of my Hebrew music. Here’s a good tutorial on how to do it: Custom iTunes 8 Genre Art.

Of course, all my Hebrew music has the genre ‘Hebrew’. Unfortunately, no matter what I did, I couldn’t get the custom genre art to work! It would work if I used the genre ‘Israel’ or ‘Jewish’, but never ‘Hebrew’.

Then I cottoned on to something. I tried the genre ‘Italian’, and that didn’t work either. Nor did ‘French’.

In short, iTunes 8 custom genre art does not work with language name genres.

Hope that helps someone. Here’s what I ended up with.

iTunes 8 Custom Genre Art

iTunes 8 Custom Genre Art

Filed under: How To, Tech
27
Apr/09
1

How to reset your Leopard Password without the DVD

Forgotten your password? No problem, here’s a way of resetting it. The bonus of doing it this way is that it doesn’t create a root user password, so it can be repeated as long as you haven’t got one.

  1. Start up in single-user mode by holding command-s while turning on the computer (this gives you root access)
  2. Type: “fsck -fy” (without quotes – ALWAYS without quotes)
  3. Type: “mount -uw /”
  4. Type: “launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist”
  5. Type: “dscl . -passwd /Users/theUsernameWhosPasswordYouWantToChange newPassword”
  6. Type: “exit”
  7. Restart your computer

That should work. If you have any problems, let me know in the comments. If you don’t, let me know in the comments.

Filed under: How To, Tech
25
Apr/09
5

God’s Design for our lives, as a PHP Script

UPDATED: Thanks to AKX for a few corrections (he’s the PHP wiz, not me)

Here’s the gospel for programmers.

Sorry about the spacing… wordpress doesn’t like tabs. Please feel free to point out any syntax errors.

var $sin = 0;
var $pricePaid = true;
var $heaven = true;
var $alive = true;
var $deathAge = 120;

// please set this variable as a boolean
var $acceptChrist =

function eatForbiddenFruit ($temptation, $resistance) {
if ($temptation == true && $resistance = false) {
$sin = 1;
$pricePaid = false;
}
}

function jesus($sinOfChrist) {
death($sinOfChrist,true);
}

function death($amountOfSinFromLife, $programmer) {

if ($amountOfSinFromLife == 0 && $programmer == true) {
$pricePaid = true;
}
else {

if ($acceptChrist && $pricePaid) {
$amountOfSinFromLife = $sinOfChrist;
}

if (amountOfSinFromLife == 0) {
$heaven = true;
}
else {
$heaven = false;
}
}

}

eatForbiddenFruit(true,false);

jesus(0);

while ($alive) {

$sin ++;

if (rand(0,$deathAge) == $deathAge) {
$alive = false;
break;
}

$deathAge –;
}

death($sin,false);

I’m thinking about expanding on this, to include all the major events of the bible. What do you think?

8
Dec/08
2

How to hide files and folder in Leopard

In Mac OS X, there’s no easy way to hide something without renaming it. Sure you can put a . in front of the name of the file/folder, but that changes the path. There’s also a way to do it with Developer Tools, but what if you don’t have developer tools?

Finally, I’ve come accross an easy terminal command to change a file or folders visibility! Just type the following into terminal:

sudo chflags hidden /path/to/file

to unhide:

sudo chflags nohidden /path/to/file

Finally! A way to hide those pesky Microsoft User Data and Halo folders that want to live in your Document folder.

If this doesn’t work for you, or if you have any questions, leave a comment and I’ll do my best to get back to you.

Filed under: How To, Tech
17
Feb/08
0

How to clean up Facebook

SpambookOnce a clean, fresh (if not so intuitive) MySpace alternative – now a spam ridden hell hole of useless applications. If you’re not met with a veritable plethora of applications each time you log in to Facebook, then you’re a minority. And if you don’t hit that damned ignore button at least 10 times a day – you might consider decalring Facebook bankrupsy, and creating a new account, to save yourself the hours of ignoring that are saved up waiting for you.

The question that came to mind yesterday is a question I’m sure many have pondered. Is it possible to take Facebook back to the “good-’ol-days” – before pirates, ninjas, warewolves, vampires, super-walls, scrabble, and any other application you could possibly be bothered to imagine?

The answer: Yes, and it’s not too hard. I like lists, here’s one to help you clean up your Facebook account.