Posted by & filed under PHP.

I am writing this blog article to you on the new WordPress 3.5.

The updates since 3.4 are really nice. I am especially enjoying the new media manager, with it’s easy to use ‘Drop files anywhere to upload’ screen. Drop files anywhere to upload

According to their Trac install, there is only six issues left to fix before they release the new update for everyone to consume.

See the remaining issues in the development version of WordPress, or try the WordPress Beta Tester plugin to test the very latest (trunk) WordPress right now.

Posted by & filed under Random Thoughts.

The theoretical capacity of a Boeing 747 filled with Blu-ray Discs is 595,520,000 Gigabytes, resulting in a 245,829 Gbit/s flight from New York to Los Angeles.

Wikipedia

Posted by & filed under Galium, OpenNIC.

.ing whois server screenshot. ++ Please do not use this server to perform high volume queries. The Registry database contains ONLY .ing and .micro domains.

The whois server for the .ing top level domain is now live. You will be able to see when domains were first registered with register.ing.

The server has been written in nodejs, which is an event-driven I/O server-side JavaScript environment based on V8 (the fastest Javascript engine, written by Google and included with Chrome).

whios.js listens on port 43 for a whois request, parses the domain to ensure that it contains no invalid characters and then requests via the new register.ing API the registration status, and further information about the domain name, if available.

The addition of the register.ing whois server finally closes one of the earliest feature requests for the register.ing service.

Posted by & filed under Experimental, Holidays.

Ever written a web application, wondering what will happen months down the track when a client (or even *gasp* you) need to install your web application?

I am working on a new installer skeleton (if you will) which will allow you to very simply create a fully functional installer for your slightly complicated web applications.

Basically, you can provide the user with different modules. Modules are either required or optional. Modules can define what forms they will show to the user. When a modules form is shown to a user, it gets the chance to run code (via a function in the module’s include file) to both before the user is asked to input any data and after. Also, a separate function can be used to validate that the user has entered correct code.

The installer is (almost) completely modular. I should have an awesome release over the next coming weeks… here is a sneak peak.

Posted by & filed under Random Thoughts.

I got an email today from Scott Heiferman, one of the founders of the site ‘Meetup’.

A lot of people were thinking that maybe 9/11 could bring 
people together in a lasting way. So the idea for Meetup was 
born: Could we use the internet to get off the internet -- and 
grow local communities?

We didn't know if it would work. Most people thought it was a 
crazy idea -- especially because terrorism is designed to make 
people distrust one another.

A small team came together, and we launched Meetup 9 months 
after 9/11.

Today, almost 10 years and 10 million Meetuppers later, it's 
working. Every day, thousands of Meetups happen. Moms Meetups, 
Small Business Meetups, Fitness Meetups... a wild variety of 
100,000 Meetup Groups with not much in common -- except one 
thing.

Meetup is totally oriented towards planning in-person group activities rather than catching up online, and I like the features it doesn’t have almost as much as those it does. You can’t create a really complex profile, private message other people, or post a bunch of status updates.

The people you meet are often very open and friendly; it doesn’t take long before they stop feeling like strangers.

Meetup really is an online network that exists to help people connect in real-life groups on a local level – the first of it’s kind. To see that it grew the way that it had made me an even more proud user of the website.

Posted by & filed under Computers, Documentation, Linux, Random Thoughts.

Yesterday I posted about having an existing ssh-agent load on all new shells. Here are two more handy snippets of code from my .bash_profile

The first code snippet is a follow on from yesterday, were I can type ‘lock’ or ‘unlock’ into my shell and the ssh-agent will follow on accordingly. When your ssh-agent is locked, users that have access to the ssh-agent will be required to type in your SSH agent password.

function lock () { ssh-add -x }
function unlock () { ssh-add -X }

The next snippet of code adds a ‘ns’ command. I have issues trying to remember IPs – especially when they are not used too often. This command lets me easily remember 🙂

alias ns='for x in ns1 ns2 ns3 ns4 ; do host $x.google.com; done'

When run:

[tim@2-xlc-controller ~]$ ns
ns1.google.com has address 216.239.32.10
ns2.google.com has address 216.239.34.10
ns3.google.com has address 216.239.36.10
ns4.google.com has address 216.239.38.10

The last dirty one liner that I love is another simple time saver. Many people use the ‘whois‘ command to find out what nameservers are used by a domain name. It’s not too long before you work out that it is not really the best way to be finding out what the domain name’s nameservers are.

function nameservers() { echo $1\'s nameservers are:; dig +trace $1 | grep NS  | grep "^$1.";  }

This handy one liner allows me to do awesome things like:

[tim@3-xlc-controller ~]$ nameservers google.com
google.com's nameservers are:
google.com.             172800  IN      NS      ns2.google.com.
google.com.             172800  IN      NS      ns1.google.com.
google.com.             172800  IN      NS      ns3.google.com.
google.com.             172800  IN      NS      ns4.google.com.

Posted by & filed under Documentation, Linux.

I love ssh-agent, but always found that running source ~/.ssh.agent annoyed me!

That was before I wrote this code, which I absolutely love:

source ~/.ssh.agent

PID=$SSH_AGENT_PID
if [ -f /proc/$SSH_AGENT_PID/cmdline ]; then
        CMD=`cat /proc/$SSH_AGENT_PID/cmdline`;
        if [ "$CMD" != "ssh-agent" ] ; then
                PID=0
        fi
else
        PID=0
fi;

if [ "$PID" -eq 0 ]; then
        ssh-agent > ~/.ssh.agent
        source ~/.ssh.agent
        ssh-add
fi;

Put simply, when added to your .bash_profile this code will ensure that your current ssh-agent is loaded. You may now ssh freely into servers without always typing that 100 character SSH Key password 🙂

Posted by & filed under Documentation, PHP.

Having problems with your (older) Magento install on your (newer) PHP?

Some versions of Magento have been using the ‘current‘ function incorrectly.

If you experience the following error:

Strict Notice: Only variables should be passed by reference in ..lib/Zend/Db/Select.php on line 216

A simpler fix may just be to change two files:

File One: lib/Zend/Db/Select.php
Find:
$correlationName = current(array_keys($this->_parts[self::FROM]));

Replace With:
$arrayKeys = array_keys($this->_parts[self::FROM]);
$correlationName = current($arrayKeys);

File Two: Toolbar.php
Find:
return current(array_keys($this->_availableMode));

Replace With:
$arrayKeys = array_keys($this->_availableMode);
return current($arrayKeys);