Trillian: AIM Error Code: 10054
After a recent automatic update of Trillian, I was unable to connect to AIM. The console stated:
Error Code: 10054
After searching around and trying a bunch of things, I was unable to re-connect until I found the following in the Trillian Technical Support Forum:
- Click Trillian > Connections > Manage My Connections.
- Select your AIM account, click Change button.
- Under the Connection tab in the Server section, click Reset, then Save Settings.
- Click Trillian > Trillian Preferences > Plugins.
- Disable AIM & ICQ by unchecking it.
- Re-enable AIM & ICQ by checking it.
- Click Close.
- Click Trillian > Connections > Global Reconnect.
This worked for me and I was able to connect to AIM once again.
PHP & imagettftext with Webcore TrueType fonts.
If you're trying to write some text using PHP/GD & the imagettftext() function, you will of course need some TrueType fonts to work with. I've found a great set of fonts available for free: Webcore. Webcore contains all the fonts web designers constantly use, things like Arial, Tahoma, Verdana, Georgia, etc..
To install, simply download to your server and install the RPM (Fedora):
shell> wget http://avi.alkalay.net/software/webcore-fonts/webcore-fonts-3.0-1.noarch.rpm
shell> rpm -i webcore-fonts-3.0-1.noarch.rpm
These fonts will now be available to you in /usr/share/fonts/webcore/.
Make sure you specify the full path when calling imagettftext(), eg:
<?php
// Set the content-type
header("Content-type: image/png");
// Replace path by your own font path
$font = '/usr/share/fonts/webcore/arial.ttf';
// Create the image
$im = imagecreatetruecolor(400, 30);
// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
// The text to draw
$text = 'Hello world!';
// Add some text
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
?>
Your mileage may vary if you are using a different distribution, but the docs state that this RPM should work on other distros.
vi: Get rid of Windows formatted linebreaks (^M)
If you've ever tried to edit a Windows-created file in Unix or OSX, you've probably encountered a messy translation in line breaks: A file full of "^M" characters. There is an easy search/replace you can use in vi/vim to format the file Unix-style:
:%s/\r/\r/g