Category: Code

Link: JSESSIONID considered harmful

Craig Condit makes a strong case against JSESSIONID in JSESSIONID considered harmful. And I just learned that it is disabled by default in Grails 1.1.

Tagged with: , ,

uHOWTO: Recover stuck modified keys from VMware Player or Workstation

If you use VMware Player or VMware workstation under Linux and you’re an alt-tab fan like me, you might end up with stuck modifier keys, so you can’t use keys like Ctrl, Alt or Shift outside of VMware. Xiao Feng

Tagged with: , , ,

update…where id in (select…) and mySQL ERROR 1093

What’s wrong with this picture? mysql> update ignore flight set intl=1 where id in (select f.id as id from flight f left join airport a on a.id=f.origin where a.country’mx’ for update); ERROR 1093 (HY000): You can’t specify target table ‘flight’

Bourne Shell Server Pages

Easy. Portable. Buzzword-compliant. Ingenuous. Elegant. Right-out wicked cool: Bourne Shell Server Pages. As I write this I’m looking for a excuse to use this revolutionary technology in my next project! Behold the simplicity of ASP and the power of sh:

Tagged with: , ,

Whitespace Matters

Mark Jason Dominus just released SuperPython 0.91, “a Perl source filter for the SuperPython language, allowing SuperPython code to be embedded into Perl programs”. In terms of language, it goes way beyond python itself to give proper semantics to whitespace.

Moving from MyISAM to InnoDB: bulk table conversion

A couple of years ago Ludovico Magnocavallo tackled the issue of bulk conversion of MySQL tables from MyISAM to InnoDB with an elegant bash snippet. The original post also suggests using grep to limit the scope of the conversion to

md5pass

This snippet is a simple wrapper around Digest::MD5‘s md5_base64() builds unsalted MD5 digests encoded in base64, very useful for LDAP management and LDIF file processing. (Source code) Use it as such: $ bin/md5pass > password {md5}X03MO1qnZdYdgyfeuILPmQ== [tags]Perl, MD5, code, code

Some lovely ASCII Art

Andrew Savige’s Bottles of Beer have been found by the Python pundits (and by some gutless Perl defectors ;-) ) and are being waved as a textbook executable-line-noise example. There’s people that can’t stand beauty when they see it. (That

Demo for Luhn algorithm in PHP

If you have a number that adheres to the Luhn algorithm for validation, you may check it easily with this short PHP snippet. (Download) You may test this script at https://javier.rodriguez.org.mx/code/luhn-test.php. Please consider that this is a demo, so please

Find out LDAP client IPs

ips.pl is a simple perl filter that processes SunONE Directory Server 5.2 access logs to find out the IP addresses that queries are coming from. It’s very useful to evaluate the impact for migrating LDAP infrastructures. Most comments and variable

Top