24 October, 2008

Eclipse icons

How to extract icons from Eclipse


I've created it in few steps:

  1. Downloaded and unzipped eclipse

  2. Extracted all images from eclipse directories, subdirectories, zips and jars*

  3. Filtered only unique files*

  4. Sorted images by dimension (16x16, 24x24, 32x32, etc.)*

  5. Removed large images (that not look like icon)

  6. Created html pages (via PHP script)

* Via my shell scripts.

This is one script from this project:
#!/bin/bash

#Find and copy only unique files (with same size and checksums) from $SOURCE directory to $OUTPUT.

SOURCE=output
OUTPUT=images

rm -rf $OUTPUT
mkdir -p $OUTPUT

uniqProcess() {

echo >xqx_unique.idx
while read; do
echo -ne \\r$REPLY
echo $REPLY $(stat -c%s $REPLY)+$(md5sum $REPLY|cut -f 1 -d ' ')+$(cksum $REPLY|cut -f 1 -d ' ')>>xqx_unique.idx
done
sort -k 2 xqx_unique.idx|uniq -f 1|cut -f 1 -d ' '|xargs -I '{}' cp '{}' $OUTPUT
}

find $SOURCE -type f |uniqProcess

17 October, 2008

emc

One more mine project: emc - remote file navigator.

It developed on:
  • Client side - Flex
  • Server side - PHP
  • RPC container - XML

This is just beta version.

It is possible to release complete version (add new functionality or implement another Server side, for example). And I'm looking for the people, who want to use this in their commercial projects.

09 October, 2008

MD5 online decryption service

Last week I released new online service: MD5 Online.

It provides online encryption and decryption functionality of MD5 hashes.

20 September, 2008

Flex - autoscrolable text area

Need TextArea with automatic scrolling to bottom?
This is not trivial, but simple:


emc\components\AutoScrollableTextArea.as
package emc.components {
import mx.controls.TextArea;

public class AutoScrollableTextArea extends TextArea {
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
verticalScrollPosition = textField.numLines;
}
}
}

For example, it is useful for outputting log information.

18 September, 2008

PHP - roots list

Unfortunately, I don't know another way how to resolve all roots (drives) under Windows:
public function getRoots() {
$roots = array();
for ($i='A'; $i<'Z'; $i++) {
$disk=$i.':\\';
if (is_dir($disk) && is_readable($disk))
$roots[] = $disk;
}
return $roots;
}

Somebody know?