The geek’s alphabet

The geek’s alphabet: a, b, c ls –a gpsd –b -N -D2 /dev/ttyUSB0 ping –c 10 psql –d test ps –e ps –f ssh len@niobe –g -L 5432:localhost:5432 psql –h localhost test tcpdump –i eth0 iptables -A LOG_DROP –j DROP cvs add –kb *.odt ls –l...

September 18, 2009 · len

Blogosfera: bloguri si biciclete

Facand de curand ordine pe aici am dat peste harta blogosferei si am incercat sa-mi confirm raspunsurile la 2 intrebari: cum a evoluat numarul de posturi? cat de mult se vorbeste in ele despre biciclete? Rezultatul: Bloguri si biciclete 2008 - 2009 Explicatii Primul grafic reprezinta numarul de posturi pe saptamana pentru toate blogurile cuprinse in harta pe perioada oct. 2008 – aug. 2009 Al doilea grafic reprezinta precentual in cate din aceste posturi s-a vorbit despre biciclete....

September 16, 2009 · len

Quick: ttf fonts and cisco vpn

2 short tricks on ubuntu linux (9.04 Jaunty): Install a .ttf font #create a fonts dir sudo mkdir -p /usr/share/fonts/truetype/myfonts #copy the font sudo cp myFont.ttf /usr/share/fonts/truetype/myfonts #update fonts cache fc-cache -fv Note: if you are using an application don’t expect the fonts to be refreshed dynamically, just restart it. Create a cisco vpn connection apt-get install vpnc Create a /etc/vpnc/myvpn.conf. If you want to convert an existing .pcf file check this article....

September 15, 2009 · len

Flex applications size optimization

After quite some time of development we realised that our application flex has grown quite large, both in functionality and size. I should have chosed to develop it in GWT since I think we could not have done even 30% of the functionality and it would have been simpler :). Joke aside the size of all the modules has grown over 50M. These are some steps I have found in order to reduce the size....

September 14, 2009 · len

Radio button renderer in a datagrid

Using a radio button as a data grid cell renderer is an example of a more complex usage of data grid cell renderers. This is one way to achive this in a not very complicated way: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ public var dp:XML = <users> <user> <name>one</name> <main>true</main> </user> <user> <name>two</name> <main>false</main> </user> <user> <name>tre</name> <main>false</main> </user> </users>; ]]> </mx:Script> <mx:VBox> <mx:DataGrid dataProvider="{dp.user}" width="400"> <mx:columns> <mx:DataGridColumn headerText="Name" dataField="name"/> <mx:DataGridColumn headerText="Main"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign="center"> <mx:Script> <!...

August 29, 2009 · len

Integrating Lightbox into Tapestry 5

This show a basic way of using Lightbox 2.03 (wiki) into Tapestry 5. First step Just copy the css, images and js/lightbox.js into the web directory. Note: the scriptaculous.js, effects.js and prototype.js are not required as they are already included in T5. Modify the .tml file <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>My app</title> <link rel="stylesheet" href="${context:css/style.css}" type="text/css" media="screen" /> <script type="text/javascript" src="${context:js/lightbox.js}"></script> <link rel="stylesheet" href="${context:css/lightbox.css}" type="text/css" media="screen" /> </head> …...

August 18, 2009 · len

cx_Oracle on ubuntu 9.04 jaunty

Update 11.11.2011, for ubuntu 11.10 oneiric oncelot: you will need version: cx_Oracle-5.0.4-11g-py27-1.x86_64.rpm if using 64bit and you installed oracle on 32 bit thus also installed libaio1:i386 the replace /lib/libaio.1.0.1 32bit with the corresponding version for 64bit or you’ll get: ``` import cx_Oracle ImportError: libaio.so.1: wrong ELF class: ELFCLASS32 ``` - if you try to use a newer version of cx\_Oracle you will get ``` import cx_Oracle ImportError: /usr/lib/python2.7/cx_Oracle.so: undefined symbol: PyUnicodeUCS2_AsEncodedString ``` End update....

August 5, 2009 · len

Navit GPS on a Acer Aspire One

This is a small experiment to use my cycling gps device with the navit application on my Acer Aspire One as a car navigation system. The system was composed of the following elements: GPS device Acer Aspire one running Ubuntu linux gpsd navit Navit GPS Required software Step 1. Install all packages required to build navit from ubuntu repositories: apt-get install build-essential pkg-config automake libglib2.0-dev libtool libxmu-dev libfribidi-dev gettext zlib1g-dev cvs gpsd gpsd-clients libgps-dev libdbus-glib-1-dev libgtk2....

July 31, 2009 · len

Hibernate localized data

Here are some reflections and solutions on how to localize strings in hibernate objects. The model I am assuming the localized strings will be stored in the database in a structure similar to: Table MY_OBJECT: … LOCALIZED_FIELD … Table LOCALIZED_DATA: CATEGORY (object type) LOCALE LOCALIZED_FK (stores the id of the localized object but without foreign key restrictions) FIELD (field of the object) DATA (the actual localization) First ideea (bad) Create a bag of composite elements with the actual localizations:...

June 18, 2009 · len

Tapestry, hibernate application (no.5)

A few years ago I was writting some simple tutorials about using hibernate with tapestry to build a simple application. I’ve used Tapestry 3, 4 and I found it reliable to build applications which are still in production. I could consider myself a Tapestry fan and as such I am disappointed a bit to write this article since I was expecting to find no need for it. My goal was to build a simple example of Tapestry – Hibernate application using Tapestry 5....

June 14, 2009 · len