Archive | Software RSS for this section

Only the first and last letters of a word need be in the right place

After my dad showed me an article in the Funny Times about how the only letters that really matter when we read are the first and last, I thought it would be fun to write a little script to scramble the inner letters of words.

Give it a try:

Below is the PHP script. It accepts a POST value named “text” and returns it scrambled:

1
2
3
4
<?=preg_replace_callback(
    "/(?<=[a-zA-Z])([a-zA-Z]+)(?=[a-zA-Z])/",
    create_function('$n', 'return str_shuffle($n[1]);')
    , $_POST['text'])?>

Server back up (or so it seems)

The server that hosts this blog (as well as all my other projects) has had a severe problem ever since I upgraded to Gutsy several weeks ago. It would crash after running for about a day or so. While I still don’t know what the actual problem was, my brother and I were able to solve the problem by downgrading to the previous version of the linux kernel. It now has uptime of over three days, which seems to indicate that the problem has been fixed.

Installed MediaWiki

White and Nerdy wikipedia screenshotIn a fit of curiosity, I installed MediaWiki on my server. Its basically the engine that Wikipedia uses. So now I have my own wiki! Horray! What I would ever use it for? I have no idea.

So, if you are looking for a wiki to spam, try Classical Code Wiki (AKA “Test”)

classicalcode.com

ddclientI have been growing weary of captbaritone.no-ip.info for some time (its very hard to explain to people) I finally broke down a bought a domain name. [edit] http://classicalcode.com [/edit] now belongs to me. (For a year). After being so disgusted with godaddy I decided to shop around for a domain name registrar with more respect for their customers. I ended up buying form a French registrar called Gandi which I am very happy with. The cleanness of the website accurately depicts the cleaness of the purchase. Unlike godaddy.com they did not try to pressure or trick me into buying anything extra, and the process was quite straightforward. The cost ended up being 15 bucks for a year. Not too bad. In order to get the domain name to point to my server (the computer in my closet) I used a free DNS from Zone Edit which was set up without too much pain. As I have cable internet, my ip address does change every now and again, so a daemon called ddclient (pictured) checks what my external ip address is every five minutes and updates my Zone Edit account.

The current setup:

Mac OS X keychain fix

Keychain First AidIt turns out there is a very simple fix for a corrupt keychain file. One of the symptoms of my MacBook battery dying is that it shuts off at unexpected times. (Very annoying) Recently it turned off right in the middle of writing to the keychain, and when I turned it back on, BAM the keychain was broken. Anytime any application tried to access anything stored in it or write anything to it, the application would fail (at best) or crash (at worst). Anyway, it turns out that the good folks at Apple realized that this might happen and included a tool to repair just such a corruption.

In Applications > Utilities is an app called Keychain Access.app. Under the Keychain Access menu is the option  Keychain First Aid. This tool will let you verify if your keychain file is broken or not (mine was) and repair it if it is. It was as simple as that.

WordPress running

Just got wordpress running. Now I gotta run. Lesson in 9 minutes and counting.

Page 3 of 3123