Licence
Creative Commons License

This work by Stephane KATTOOR is licensed under a Creative Commons Attribution 3.0 Unported License.
Feeling like tipping ?
If you find this blog useful, you might consider sending a few bitcoins to support it : 1BTtsC3beGJ6ysd8DhrXjdo6jVw5WD9mvY
RSS
 
RSS Feed
Follow me !
Tech@Sakana on Facebook
Search this site

Newsletter

Get latest posts by email (No spam, only posts):

Enter your email address:

Delivered by FeedBurner

Categories
Monthly archives
February 2012
M T W T F S S
« Jan    
 12345
6789101112
13141516171819
20212223242526
272829  

Category: Dev

All development related posts

Perl : Optimizing pattern searches with Regexp::Assemble - December 8, 2007 by Stephane Kattoor

When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.

In order to optimize such a pattern matching, you can use the Regexp::Assemble module.

read this entry »

PostgreSQL : create a user, a database and grant accesses - June 6, 2007 by Stephane Kattoor

The following step-by-step will let you create a user, a database (DB) and grant full access to the user to this DB.

read this entry »

Scripting Twitter with Perl + LWP - March 18, 2007 by Stephane Kattoor

A little follow up on yesterday article about scripting Twitter with cURL: the solution was working, but somehow inconvenient. Not practical to have to go and fetch the user id every time you want to send a direct message !

This time, I scripted Twitter direct message with Perl and LWP (libwww-perl), for a much more convenient solution. I designed it to be used like a sort of universal paging service.

read this entry »

Scripting Twitter with cURL - March 18, 2007 by Stephane Kattoor

Twitter already provides an API but it is currently very limited. It will let you fairly easily change your status, but won’t let you send a direct message.

Comes in cURL. cURL is a very versatile command line utility which is designed to script web pages interactions. As a little demo, I’ll show you how to use it to easily overcome the shortcomings of Twitter’s API.

read this entry »

Dump an entire SubVersioN repository into a flat file - February 26, 2007 by Stephane Kattoor

There are many reasons you might want to dump your SVN repository to a flat file : for example to simplify backup operation, to transfer to another server, or to convert your repository from FSFS to BDB or the opposite.

read this entry »

Fun with google maps - August 9, 2006 by Stephane Kattoor

I’ve written 2 sample applications to demonstrate how easy it is to use the API v2 of Google Maps.

I was honnestly surprised to see how easy it actually is… Have a look at the source of the pages and see for yourself ;-)

read this entry »

DocBook - May 14, 2006 by Stephane Kattoor

Bored of fighting with MS-Word to have proper titles numbering ? Tired of messing around styles ? Want a more “meaning oriented formating” and less “aesthetic oriented formating” ? Would like to generate HTML, PDF, WindowsHelp, or anything from the same source file ?

Have a look at DocBook ! DocBook is a document standard which lets you do all of this, and much more …

And XMLMind XML Editor is a nice free (like beer not ideas) editor which lets you edit DocBook Documents in a WYSIWYG fashion.

Links :

DocBook : The Definitive Guide

XMLMind XML Editor

FreeBSD’s handbook (written in DocBook, and rendered as HTML)

Websites with Catalyst - April 9, 2006 by Stephane Kattoor

If you like Perl and you make dynamic websites with databases backends, Catalyst is definitely worth a look.

It is basically an MVC engine for websites. It lets you nicely separate your business logic, the display and the database backend.

It has extended plugins to deal with things like authentications, sessions, templates, RSS, and God knows what :)

It can integrate Apache, and harness mod_cgi’s power for high-performance web applications.

It is a little bit tricky to get it right at the beginning, but there are nice tutorials.

Have a look ! :)

Main website you’ll find everything there

Deploying Perl apps - April 4, 2006 by Stephane Kattoor

I usually code my perl programs on a development machine, and then ty to make in run in the production environment.

I used to manage by myself the various needed packages and tried to have them installed on the production environment as needed.

And one day I had to make a script run on a machine where Perl itself was not even installed…

This has been a nightmare until recently, that is to say until I discovered the PAR module. PAR is closed to the Java JAR files.

Once you have the PAR package installed, you have a set of helper scripts installed as well. Having you script run somewhere else is then as simple as :

pp -o app app.pl (you might want to do pp -o app.exe app.pl if you’re on Windows)

This script will analyze the script, gather all the dependencies (“all” including the Perl binary, used modules and DLLs), and build a self extractible archive which will unpack and execute your script when run.

Simple ? :)

Character conversions in Perl - February 8, 2006 by Stephane Kattoor

If you want to convert strings from, say, UTF-8 to Latin1, then you can do this as simply as this :

use Unicode::String qw(utf8);
print utf8(“string in utf-8″)->latin1

Easy ? :D

« old entrysnew entrys »
Who am I ?
Ads