— Shang Liang

Archive
Tools

B.I.R.M.E (Batch Image Resizing Made Easy) finally gets an update and it’s a HTML5 web app now. I’ve finally achieved my goal, to make a software which does not need to be installed and runs in all operating systems. The resizing is done by Javascript so the user do not need to wait for uploading the file to the server and then download them later.

Well, it’s not perfect. BIRME uses drag and drop and File API. Recent versions of Chrome and Firefox support these functions well. Safari 6 and IE10 will be fine once they are released. I haven’t tried it out in Opera yet (to be honest, I’m not interested to find out).

This is the most useful thing I’ve ever made so far.

Read More

“It is a lot of hard work to save individual elements from Photoshop (PSD) files into separate images, especially when there are a lot of them.” Therefore, I created this tool to speed up the process. I have kicked myself many times for only thought of it recently.

Download here.

Read More
Here’s the step by step instruction:
  1. Create a “installyum.sh” file: vi installyum.sh
  2. Paste the code below inside
  3. Change the [mirror-site-address] to somewhere near you. The list can be found at CentOS’s Website. Remember to change i386 to x86_64 if you are using 64 bit system.
  4. Press Shift+ZZ to save and exit
  5. Grant executable right to the file: chmod +x installyum.sh
  6. Run the script: ./installyum.sh

Here’s the shell script.

for file in \
gmp-4.1.4-10.el5.i386.rpm \
readline-5.1-3.el5.i386.rpm \
python-2.4.3-27.el5.i386.rp \
libxml2-2.6.26-2.1.2.8.i386.rpm \
libxml2-python-2.6.26-2.1.2.8.i386.rpm \
expat-1.95.8-8.3.el5_4.2.i386.rpm \
python-elementtree-1.2.6-5.i386.rpm \
sqlite-3.3.6-5.i386.rpm \
python-sqlite-1.1.7-1.2.1.i386.rpm \
elfutils-libelf-0.137-3.el5.i386.rpm \
elfutils-0.137-3.el5.i386.rpm \
popt-1.10.2.3-18.el5.i386.rpm \
rpm-libs-4.4.2.3-18.el5.i386.rpm \
rpm-4.4.2.3-18.el5.i386.rpm \
rpm-python-4.4.2.3-18.el5.i386.rpm\
m2crypto-0.16-6.el5.6.i386.rpm \
python-urlgrabber-3.1.0-5.el5.noarch.rpm \
python-iniparse-0.2.3-4.el5.noarch.rpm \
yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm \
yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm \
yum-3.2.22-26.el5.centos.noarch.rpm
do rpm -Uvh --nodeps http://[mirror-site-address]/Linux/CentOS/5.5/os/i386/CentOS/$file;
done

Read More

I’ve just started using Sass to code CSS. I really like it because it has greatly boosted my ego as a programmer, “I can put programming logic inside my CSS!” And of course, it makes it much easier to manage a complicated CSS. However, I can’t edit scss files with Dreamweaver and I miss seeing the colorful syntax. After searching for a while, I found the solution.

less-scss-syntax-highlighting-in-dreamweaver

It’s quite easy. All you need to do is to find this file Dreamweaver CS?/Configuration/DocumentTypes/MMDocumentTypes.xml and change this line macfileextension=”css” to this macfileextension=”css,scss”.

Read More

Try it Now!

[UPDATE] BIRME is an HTML5 App now and you can use it online. 

The story behind

As a web developer, I often need to resize images into a specific dimension to suit the website’s design. I used to resize images in Photoshop but I find it tedious to record actions again and again for different websites. Besides that, Photoshop is not cheap and not everyone has a (legal) copy. I tried some existing software but none of them satisfied me. Therefore, I decided to write one myself .

I’ve been searching and testing with many different platforms to develop it, C++, Java, Python and Perl. None of the above can achieve what I wanted, a single executable file without any extra libraries or dll files, no installation required. Finally I landed on PHP and I used bamcompile to generate an executable file. I still have troubles to get a Mac or Linux version of any PHP compiler to work. I may re-use my C++ code for Mac in the future and wrap it up as an .app.

Read More

Most of my Flash projects use XML as “database” and PHP is my preferred server script.  I found Simple_HTML_DOM Parser quite a good tool for reading and writing XML files. The default DOM in PHP is quite hard to use. The syntax for creating nodes in PHP is very tiring. Besides that, the biggest headache is that the scripts written for PHP 4 are not compatible with PHP 5.

Simple HTML DOM Parser is designed for reading and editing HTML but it works fine with XML files, since XML files are more tidy than HTML. Reading and traversing the XML is easy, just use the find function.

$xml = file_get_html('http://www.google.com/');
foreach($xml->find('img') as $element)
       echo $element;

Writing a new node is not difficult either.

$node = str_get_html('<sample_node>Hello World</sample>');

Read More

Previously in Flash CS3, the trick of getting autocompletion in FlashDevelop is not working any more in Flash CS4, ast least not in my case. After testing a while I finally got it working again by setting the swc path of the project.

Choose “Project>>Properties…>>Compiler Options>>SWC Include Libraries” and add the path of AIR swc to it. Most likely it would be something like this: “C:\Program Files\Adobe\Adobe Flash CS4\AIK1.5\frameworks\libs\air\airglobal.swc”

Cheers!

Read More

Useful for Flash users and more useful for Flex users to geenerate the glyph ranges. Built with JavaScript.
>>enjoy<<

Read More

flash structor creator

Danny and Edward are working on this awesome flash extension panel that helps to create a project structure. The tool is mainly for website developers and it generates HTML file integrated with swfaddress and swfobject automatically. The cool thing about it is the tool uses an XML schema to generate all the files needed. It’s very flexible and easy to customise for other purposes. We’ve made it as an open source project and you can download it in google code.

Read More

I’ve made this little AIR application to generate asdoc commands. It’s in BETA 2 now. Not sure whether I should work on it further more because I’d like to keep it simple. The project is hosted here. Please help to report any bugs/issues at the issues page.

Read More