Zhang Le's Code Snippet Page
 

Here lists pieces of short code/scripts written in various languages by myself. Most of them are small fraction of code that do only one thing, and try to do it well. All of them are provided with source code under a BSD-like license. In a few cases of half-baked project, only binaries are provided at this point. Feedback welcome!

Here's a short summary:

Code Snippets

  • httpd.py

    This is a minimal http server written in python. It's useful for fast transferring files in LAN. Just run the script 'httpd.py' then all files under current directory (and sub-directories) are available to your browser.
    Download: httpd.py (2k) (Mon May 16 21:22:30 2005)

  • C mmap() wrapper

    A platform independent mmap wrapper for unix and win32. It is by no means perfect. Generally I find it works well and may be useful to others. A C++ wrapper is also included.
    Download: mmapfile-20050521.tar.gz (4k) (Sun May 22 00:53:21 2005)

  • C iconv() wrapper

    An iconv() wrapper for unix and win32 (libiconv). iconv() call is a versatile tool for converting strings in different encoding from/to unicode. Unfortunately the C interface of iconv() is very difficult to use. The C wrapper code simplifies the task of using iconv(). By default all strings are converted to/from UCS2 (2 bytes).
    Download: iconvert-20050529.tar.gz (5k) (Sun May 29 10:04:17 2005)


Last Change :29-May-2005. Please send any question to Zhang Le