Posts By:

Flash media server and apache

Posted by & filed under Linux.

At work, due to a Flash Media Server running on one of the IP addresses, when we restart Apache using WHM, everything gets disconnected, and this causes Apache to fail. Here are instructions for what to do if someone restarts Apache: Open Putty and login to the server. Insert this line to access the FMS… Read more »

Putty with SSH keys

Posted by & filed under Linux, Odds.

Use Pageant for loading the key, then in Putty make sure you add the username to the Connection -> Data -> auto-login username. Once you’ve done that, make sure that Connection -> SSH -> Auth has “attempt authentication using Pageant ticked, and “attempt keyboard-interactive auth. Here’s a good article.

Using Tunnellier to HTTP over SSH

Posted by & filed under Odds.

The recommended browser for this purpose is Firefox, because it can be configured to resolve DNS names through the SOCKS proxy, so the names of the websites you’re browsing don’t leak out through DNS queries. You will need an account at an SSH server which allows you to use port forwarding. Configure Tunnelier to connect… Read more »

Parsing WordPress wp-config.php file

Posted by & filed under OOP, Wordpress.

I need a script to extract the database details from the wp-config.php file so I could keep the logon details in one location when I was coding something outside the WP framework. I came up with a class that does this, connects to mysql and selects the database. There are three connection options: PDO, mySQLi… Read more »

Highlighting imagemap borders

Posted by & filed under Javascript.

So you have an imagemap and you want to show the border on mouseover – not the image border – the imagemap boarder. To the rescue is a JQuery plugin by a guy called David Lynch. Here’s a working example: Here’s a link to David’s documentation: http://davidlynch.org/js/maphilight/docs/

Netbeans 6.9.1 Line/Word wrap option

Posted by & filed under Netbeans.

To use the word wrap option you need to edit the /Netbeans 6.9.1/netbeans.conf file. The netbeans_default_options, usually under (# command line switches) should include the following switch: -J-Dorg.netbeans.editor.linewrap=true Once this is set, restart Netbeans and the option should now be available in Tools->Options->Editor->Formatting.

Linux show directory sizes

Posted by & filed under Linux.

To find the size of directories in the current path: du -h -c –max-depth=1 flag -h = human readable, -c = display total sizes. Remove the –max-depth=1 bit if you want to see subdirectories.

PDO – bindParams vs. bindValues

Posted by & filed under OOP.

I was trying to supply binding params to a PDO query like this: However, this will not work. From the PHP manual – “Unlike PDOStatement::bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement::execute() is called.” So, the correct way to do this would be: See also,… Read more »

Bitnami