Home

- Sungnyemun.org

Software for mobile and static users

Software

  • ImageTools A basic image manipulation library focused on speed. Probably the fastest native RB code around! Compiled app + source code.
  • curllib A dynamic library and RB module for [S]FTP transfers
  • fPic A dynamic library and RB class to manipulate images in CLI apps
  • Serial TerminalA basic application to communicate with serial devices
  • TomabaemA helper application for Unicode and CJKV languages
  • Tomabaem OnlineA web-based simplified version of Tomabaem
  • cmdLineA small app that enables you to find and launch applications without touching the mouse...
  • iTunes PlaylistGenerates an iTunes Playlist with random tracks of a set of Artists.

Wordpress plugins

  • parse-referer.wp A simple plugin that logs page views and shows referers to each post, with hit counts.
  • recent_hReviews.wp A Wordpress plugin that displays a list of recent hReviews posted on your blog

Python Code Bits

  • fixEncodings.py A script that fixes some encodings problem (Latin-1 to UTF-8). It was a ad hoc solution to a specific problem, it could be useful to others, for all I know...
  • google.py A small command-line app in Python which queries Google for a string. Code base comes from Yaspyb, my IRC bot. Shows how to masquerade as a browser, download an HTML page, and parse it.
  • urlCall.sis A small application for Nokia Series 60 mobile phones [and maybe others -- it sure requires Symbian, other requirements unknown....]. Basically it enables you to associate a "call number" to a URL, and enter these numbers to "dial" into a web site via your GPRS connection or whatnot. After an idea by Don Park, http://docuverse.com/blog/donpark/

Lubricate The Primate

  • figaro.user.js A GreaseMonkey script that removes the SmartAd on Le Figaro.

RB Code Bits

  • AES in RB A shared library [Mac OS X and Linux] and Module to perform AES en-/decryption
  • ContextExample.rb A small example that shows the usefulness of Context in RBScript.
  • Open GL Spinning Boards.rb A sample RB app (compiled app + code) showing how to programme an animation in OpenGL using Declares.
  • Open GL framework.rb An OpenGL framework based on the OpenGL declares by Mathijs van Duijn and John Balestieri, plus the GLUT declares I added from Apple's GLUT.framework header file (and a bit of regex and XML trickery). Comes with a sample project of spinning objects, animated and controllable.
  • bitbatbut.rb A regex example that I wrote in asnwer to a question on the RB-NUG mailing list. I looks for a couple of patterns (genetic code stuff), and sets matches in red.
  • colourize.rb A routine and demo project for colourizing source code, in RealBasic.
  • dropNsave.rb A simple application that demonstrates several functionalities, from dropping a file onto a window to resizing images to exporting.
  • email boundary class.rb An email raw source decoder. It parses correctly, for instance, subject strings with multiple encodings. Shows how to decode attached files, too (in this sample, an image).
  • percentXX to text.rb A simple utility that decodes %xx entities (like in a URL), through a mixture of regex and ReplaceAllB().
  • vtString.rb A custom implementation of the Strings object demonstrating among others the process of overloading operators. Its major feature is the nthField function, which can be up to 10 times faster than the original in RB.
  • wrapped regex class.rb A simple wrapper around the RegEx class, that adds a "search all" functionality.

Erlang Code

  • png.erl An ongoing project to make manipulation of PNG files possible in Erlang
  • rinder.erl Erlang code based on Christian Rinderknecht's coursework

It's free, but...

I won't spit on you if you tip the barman...

User login



  • Create new account
  • Request new password


+ -

Not much to explain: this generates a supposedly unique ID suitable for Firefox extensions or Microsoft applications. I think :-) I don't do M$, how could I know?

By dda at 2006-11-06 14:01 | add new comment

Erlang code bits

I've added a "Erlang code bits" category, where I'll dump [hopefully] useful snippets of code that could be of use to other people. The first two are rinder.erl, an implementation of the Morris-Pratt algorithm, from Christian Rinderknecht's teaching materials; and png.erl, a project to enable manipulation of PNG files in Erlang. This file has only a couple of functions for the moment, which read the IHDR header and return basic data on the file {width, height, bitDepth, colourType, compression, filter, interlace}. More to come soon.

By dda at 2006-08-18 05:38 | add new comment

id3v2 RC1 released

I had mentioned several times, in a casual manner, on the RB-NUG list that I was working on an ID3v2 class. That thing had started as a request by a customer who needed to see/show artwork in MP3 files.

As usual, every time I set foot in terra incognita I start poking, thinking it'll be a quick hack, and whaddayaknow, I'm in for a long trip... This time it took an inordinately long time, due to day-time jobs [yeah, plural] issues and a lack of interest among the RB fellows.

However one fellow kept bugging me to add a save function, and I finally came around to it, and thanks to this RB fellow, I was able to produce the first Release Candidate for this RB class.

I am currently cleaning it up and ironing out the last few bugs, watch this space for more...

By dda at 2006-05-14 06:12 | add new comment

AES for RB

Following a discussion on the RB-NUG on encryption in sqlite/RB Databases, I decided to hack together a quick AES encryption/decryption. I got the rijndael C implementation, compiled it as a dynamic/shared library on Mac OS X and Linux, and wrote a quick RB module to go with it.

You basically have two functions [each with a _VERBOSE alternate that enables you to follow what's happening in the Terminal – CLI apps only]:

  • Function ComputeKeyMaterial(mb As MemoryBlock) As MemoryBlock
      This function takes a Memory block containing [keyLength/8] bytes and return a properly formatted keyMaterial to be used in the two functions below.
  • Function AES_DECRYPT(keyMaterial As MemoryBlock, inBuffer As MemoryBlock) As MemoryBlock
      keyMaterial should be 128, 192 or 256 bits long.
  • Function AES_DECRYPT(keyMaterial As MemoryBlock, inBuffer As MemoryBlock) As MemoryBlock

That's pretty much it. The few tests I made so far seem to work, as you can see for yourself with the sample project: it's a command-line app, you can launch it without any arguments or add some clear text to encrypt [between quotes just to be safe...]. Let me know of any issues you may encounter...

Downloads

  • The Mac OS X Version
  • The Linux Version
  • Build your own dylib/.so from the sources... build script included!
No restriction and no warranties. Use at your own risk and for your own pleasure!
By dda at 2006-03-13 21:41 | add new comment

cURLlib for RB


[S]FTP transfers in RB made easy

One thing that is sorely missing in RB is SFTP transfers. The closest way I ever came was to use curl in a shell class. But it's a kludge. After a discussion on a blog, I started poking around libcurl's C API, and managed to produce quite easily an upload method in RB with a gazillion Declares [13 if I remember correctly]. All you needed was a copy of libcurl.dylib on your system. You had the option to do FTP or SFTP, thanks to the CURLOPT_FTP_SSL option. So we get both transfer protocols for the price of one. Sweet...

Then came the download part. For some obscure technical reason [curl needs a callback method, and the parameters are almost impossible to implement in RB], I had to write the download method in C, and compile that into a dynamic library. Which is a pain, since there goes cross-platformness. On the other hand, I linked statically to curllib, so now all you need is the dylib and the curllib module. The [compiled] demo application has a "Frameworks" folder inside the bundle, containing the dylib. A demo account is provided, which allows you 5 transfers before it locks up. To purchase an account, click on the button below.



Sample upload code

Dim ssl As Integer
curllib.Init("user@test","CURL4RB 7DAF-ED42-AFAD")
// Identify yourself. This is the demo login.
if f<>nil Then
  if cbSFTP.Value Then
    ssl=curllib.SSL_TRANSFER
  else
    ssl=curllib.NO_SSL
  end if
  curllib.Upload(f, efLogin.Text, efPwd.Text, efURL.Text, ssl)
end if

As you can see it is very straightforward. The transfer is synchronous: the app will wait for the transfer to succeed [or fail]. I will implement the asynchronous interface later.

Requirements

You need the curlFTP.dylib and the curllib Module; curlFTP.dylib goes into a "Frameworks" folder inside the app's bundle [Mach-0]. It is Mac OS X only for the moment. I will try to provide a Linux version soon. As for Windows, I'll have to work on it more.

Necessary evil

When purchasing a registration code for cURLlib4RB, you will receive all updates for one year, from purchase date. And of course registered users are allowed to pester me about functionalities and bugs...






Download

Get the demo here. The demo mode can be unlocked without having to download another version.

MD5 (libcurl4RB.tgz) = a73ddb936d1d573d96bbd2687eb4c9df

Updates

I have uploaded a new version [2005.12.22]; the previous one seemed to require curl, despite my saying it didn't. Compile-time snafu, I guess – or lack of XCode foo. So I switched to linking dynamically to libcurl, which you'll need to install. Other dependencies are met with standard OS X install. Sorry about that. Will try to fix that later.

Features:
There are three methods available:

  • getFTP(URL As String, targetFolderItem As FolderItem, isSSL As Integer)
  • putFTP(file2upload As FolderItem, Login As String, Pwd As String, URL As String, isSSL As Integer)
  • curllib.getHTTP(URL As String) As String
isSSL can be set with: curllib.SSL_TRANSFER and curllib.NO_SSL

This little dylib was meant to be used mainly for [S]FTP transfers, but since it's all there, I added the HTTP[S] get, and could possibly add more. Useful for quick jobbies, I guess...

Dependencies

dda> otool -L curlFTP.dylib 
curlFTP.dylib:
        curlFTP.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libcurl.2.dylib (compatibility version 3.0.0, current version 3.2.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
        /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
        /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 71.1.4)
By dda at 2005-12-01 15:21 | add new comment

Google

Google




Web
sungnyemun.org