Tequila Fish Ran-dumb ramblings of me…

23Jul/07Off

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:

  1. Click Trillian > Connections > Manage My Connections.
  2. Select your AIM account, click Change button.
  3. Under the Connection tab in the Server section, click Reset, then Save Settings.
  4. Click Trillian > Trillian Preferences > Plugins.
  5. Disable AIM & ICQ by unchecking it.
  6. Re-enable AIM & ICQ by checking it.
  7. Click Close.
  8. Click Trillian > Connections > Global Reconnect.

This worked for me and I was able to connect to AIM once again.

Tagged as: , 3 Comments
21Jul/07Off

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.

3Jul/07Off

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

Tagged as: , , No Comments