tag:blog.jaumesola.com,2013:/posts Jaume Solà 2017-09-16T00:00:31Z tag:blog.jaumesola.com,2013:Post/1184405 2017-08-17T12:17:28Z 2017-08-17T13:36:40Z Installing Ethereum's geth on macOS

A quick guide of what worked for me. 

Geth is the official implementation that allows you to run an Ethereum node. There are several others.

I installed it with Homebrew based on the official geth guide for macOS.

Homebrew installation:

$ su admin
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Geth installation:

$ su admin
$ brew tap ethereum/ethereum
$ brew install ethereum

Verify (as regular user):

$ geth
  • wait for message "Starting P2P networking"
  • interrupt (Ctrl-C)
  • check that there are no obvious errors
Jaume Sola
tag:blog.jaumesola.com,2013:Post/1182488 2017-08-10T18:29:25Z 2017-09-16T00:00:31Z Setting up an Ethereum node on the Rinkeby testnet

Warning: this worked for me on macOS as of August 2017. Over time you can expect some/most/all of the information here to have changed.

There are several testnets, a number of them old/deprecated. The latest seem to be Kovan and Rinkeby. Kovan seems to work only with Parity while Rinkeby seems to work only with geth.

You will need to install geth first.

I mostly followed this guide.

I tried first the experimental light mode but I got errors, so I tried with the full mode. Not a big deal at this moment because the size on disk is below 1GB and it took around one hour to download/build with a 2011 macbook Air.

I prefer to make the data directory explicit (where the blockchain files will be stored), so I first create one on a disk of my choice. Also I will work from that directory, so I will assume all commands are entered from it.

$ mkdir /path/to/rinkeby
$ cd /path/to/rinkeby

intitalise with genesis block

$ curl -O https://www.rinkeby.io/rinkeby.json $ geth --datadir=. init rinkeby.json

load blockchain 

$ geth --networkid=4 --datadir=. --ethstats='yournode:Respect my authoritah!@stats.rinkeby.io' --bootnodes=enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@ --cache=1024

Wait. You will see the INFO message "Block synchronisation started" then many INFO lines starting with "Imported...". Sync is in progress... 

  • Note the 1GB cache, you can use less or more depending on your available memory
  • Network id 4 corresponds to the Rinkeby chain
  • Blockchain data will be stored in geth/

Check blockchain sync progress

While the node is up & running (the above command) you can get info about the blockchain sync progress (among other data) through the JavaScript console. In another terminal window type:

$ cd /path/to/rinkeby
$ geth attach ipc:geth.ipc

At the ">" prompt you can type, e.g.

> eth
> eth.syncing
> adm
> adm.peers

You can double check you are seeing the right data progress by looking at the last block at www.rinkeby.io home page.

Note that the "NOTE...Importing..." messages include a number parameter which is the block being processed.

Getting free (worthless) ether for testing

Create a testing account

Create an account, enter password, get its address (account data will be saved to keystore/):

$ geth --datadir=. account new
...(enter password):..
Address: {559b0e5a899d9ef4c04ee35ccbefab2e6d7f06da}

That is the address I got. In order to use the faucet & get ether into this account, first create a github gist with just the hash in it (remember to prepend with "0x"). In my case:

Now use your gist URL in the faucet feature at www.rinkeby.io

I requested 3 ETH, then I searched etherscan with my address to verify I got them:


Next verification step would be to verify that locally we also get the correct balance.

We first verify it is taking the accounts we created (files in keystore/)

> eth.accounts
["0x559b0e5a899d9ef4c04ee35ccbefab2e6d7f06da", "0x62c8681441620cb0574fcee27d6085529067b8da"]

The first one (index 0) is the one I got my 3 ETH, let's see if they are on our local blockchain (balance for account 0):

> web3.fromWei(web3.eth.getBalance(web3.eth.accounts[0]));


Now we may keep using geth, or a wallet for a nice UI.

Jaume Sola
tag:blog.jaumesola.com,2013:Post/1172124 2017-07-10T10:53:49Z 2017-07-22T18:22:58Z Share a Mercurial repository on github (macOS)

Local macOS configuration

Python & Mercurial

This was tested on macOS El Capitan, with Pyhton 2.7 and Mercurial 4.2.2

Install Hg-Git

You will need the Hg-Git Mercurial plugin.

It can be installed with Python's package installer pip.

Install pip first:

$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py

Install Mercurial (eventually) & Hg-Git:

$ sudo pip install mercurial
$ sudo pip install hg-git

Enable the extension:

$ vi ~/.hgrc:

hggit =

SSH key for github

create SSH key (details)

  • ssh-keygen -t rsa -b 4096 -C "someone@example.com"

add it to your github account (details)

  • $ pbcopy < ~/.ssh/id_rsa.pub
  • Github: Settings -- SSH / GPG Keys -- New SSH key -- paste clipboard

Configure & share repository

create empty github repository

  • create on github
  • copy its URL
configure local empty repository
$ mkdir myrepo
$ cd myrepo
$ hg init

set username & include github URL as default 
$ vi .hg/hgrc

username = Someone Example

default = git+ssh://git@github.com/someoneaccount/myrepo.git

Push & pull

Upload local changes to github

hg addremove
hg commit
hg bookmark -r default master
hg push

Integrate locally changes made on github

hg pull -u

Jaume Sola
tag:blog.jaumesola.com,2013:Post/1153682 2017-05-13T10:54:08Z 2017-05-15T12:02:19Z Looking for a Web Designer and/or Front End developer to join a future startup in Valencia

We are building a team that will participate in the startup acceleration program by Bbooster.

This is an intensive program of 4 months (June to September), at the end of which we expect to get funding (65% of the projects got it in past editions and we believe ours is among the best :-).

Ideally full-time on-site in Valencia as a founder, but we are also open to some other kind of collaboration like part-time or remote.

The project will be an internet portal initially focused in the tourism sector and collaborative economy. 

Current team members have expertise in business, marketing and backend development. We need to cover the graphical design/UI/front end area.

Interested? Contact me on Linkedin


Jaume Sola
tag:blog.jaumesola.com,2013:Post/1146369 2017-04-14T12:02:16Z 2017-06-15T10:11:31Z Quick & easy LAMP installation on Linux Mint 18

This worked for me on version 18.1 Serena Xfce

Install Apache

sudo apt-get install apache2

Verify: open browser with URL http://localhost/

Install PHP 7

Jaume Sola
tag:blog.jaumesola.com,2013:Post/1145195 2017-04-09T19:45:27Z 2017-04-09T19:45:28Z Email Round Trip Monitoring

If you administer an email server as I do, it's very useful to have an automated monitoring system that checks often that it works properly.

My first try on any new feature I want to add to my non-fatally-critical systems is to use an external service, specially if it can be done for free. Whereas there is a number of server monitoring services, most don't include roundtrip email monitoring, at least on their free plan. 

The only one I found to include it is...

Jaume Sola
tag:blog.jaumesola.com,2013:Post/1144520 2017-04-06T17:52:38Z 2017-04-09T11:37:19Z Force HTTPS & www

You want to force any URL that doesn't include either:

  1. HTTPS
  2. www subdomain
to be redirected to the corresponding URL including both.

The following directives in the .htaccess file worked for me for a simple static site:

RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

There must be a way to make the first condition generic and avoid hardcoding domain.com, I just didn't investigate it, maybe you already know how & can comment below ;-)

Jaume Sola
tag:blog.jaumesola.com,2013:Post/948712 2015-12-13T18:01:34Z 2017-08-22T20:07:34Z Symfony 3 on MAMP with Mercurial VCS and Eclipse IDE - part 2

comes from part 1

As it already "does something" we will continue with the demo app.

Jaume Sola
tag:blog.jaumesola.com,2013:Post/948434 2015-12-13T17:05:12Z 2017-07-16T13:28:31Z Symfony 3 on MAMP with Mercurial VCS and Eclipse IDE - part 1

I use MAMP+Mercurial+Eclipse as PHP development environment on Mac OS X. These are instructions for this environment adapted from https://symfony.com/doc/current/book/installation.html

Jaume Sola
tag:blog.jaumesola.com,2013:Post/604720 2013-09-27T12:09:31Z 2017-04-06T18:13:13Z PHP Development Environment with Aptana on Mac OS X

Warning: this is a quite old setup, probably not interesting any more.

Jaume Sola
tag:blog.jaumesola.com,2013:Post/577257 2013-05-04T12:32:00Z 2017-08-28T09:35:25Z The easy way to convert XML into PDF J4L FO Designer is a productivity tool that helps you to convert XML files into PDF by using Apache FOP, the open and free implementation of the XLS-FO standard.

Our product intends to save you a significant amount of your time, and spare you the difficulties of a manual process. As explained in my previous post “How to create PDF files from XML with Apache-FOP”, XSL-FO and Apache-FOP provide a free and standard way to create PDF files in a language independent manner.

But there are a number of disadvantages with that approach, e.g.:

  • you have to learn XSL-FO (and therefore also XPath and XSL).
  • even if you know XSL-FO you do not want to be writing FO templates using a text editor.
  • there is some logic that cannot be easily defined using XSL-FO. For example, grouping of data requires you to use the so called Muenchian method , which isn't straightforward to understand.

In order to overcome these drawbacks, at J4L Components we have developed J4L FO Designer. The designer is a Visual (WYSIWYG) editor that will generate XSL-FO files for you. This makes the start into the XSL-FO world very easy, and it is also a useful tool for experienced developers since you can create and test XSL-FO files very quickly.

Jaume Sola
tag:blog.jaumesola.com,2013:Post/235611 2013-03-19T11:39:24Z 2017-07-17T19:46:46Z Usar Gmail para cuentas de correo que no son de Google.

Este procedimiento sirve para cuando tenemos una cuenta de Gmail y queremos usar Gmail como servicio para gestionar otras cuentas que no son de Google, sin tener que decir a nuestros contactos que hemos cambiado de correo. Es decir para nuestros contactos no cambia nada: siguen usando nuestra dirección de correo que conocen. Para nosotros cambia que usamos el servicio de Gmail para gestionar este correo y, aunque sigue activo, ya no necesitamos usar el servicio del proveedor original.

Repitiendo este procedimiento se pueden integrar varias cuentas externas en una ÚNICA cuenta gratuita de Gmail. También se puede repetir usando varias cuentas independientes de Gmail gratuito. Si se desea un servicio unificado para la gestión de diversas cuentas de una organización con Gmail, deberá contratarse el servicio de pago "Google Apps".

Jaume Sola
tag:blog.jaumesola.com,2013:Post/235613 2013-02-06T10:35:47Z 2013-10-08T16:11:44Z New J4L FOP Server professional edition - run as a Windows service We have a new product, an improvement over the free FOP server, an optional companion product to J4L FO Designer.

The main new feature is that it can be run as a Windows service, and therefore is more suitable for production environments. As a commercial product it also includes 6 months support.

Relevant links:
J4L FOP Server
J4L FOP Server versions
J4L FO Designer
Purchase J4L FO Designer / J4L FOP Server Professional]]>
Jaume Sola
tag:blog.jaumesola.com,2013:Post/235614 2011-10-12T18:42:00Z 2017-07-09T13:06:52Z How to create PDF files from XML using Apache-FOP


Nowadays, XML is the native format of many applications, Oracle APEX for example, partly bases its reporting systen on XML. Middleware as Oracle BPEL, SAP PI, IBM Websphere and of course many Web services are also XML based. XML is also being used as exchange format in business to business transactions, for example for e-Invoicing. In these and many other environments there is often the need to create PDF files from XML.


In the past PDF files would be created using proprietary reporting tools that would use a database as data source. Additionally these tools are programming language specific. Later on the XSL-FO standard allowed for a better way to do it in many cases.

What is new about XSL-FO?
- it is programming language neutral.
- it is a standard so you are not tied to a vendor.
- it uses XML as data source.

Apache FOP

One implementation of the XSL-FO standard is Apache FOP. One important aspect about this implementation is that the Apache license model allows to use it in commercial environment.

Many free/open source products have a license model that puts strong restrictions on the way you may use the software. Not surprisingly there are software companies that do not allow the use in their code any open source software other than Apache Foundation one. So if you use Apache you know you are on the safe side.


Jaume Sola
tag:blog.jaumesola.com,2013:Post/235615 2011-09-20T00:10:00Z 2017-04-08T15:31:53Z J4L Barcodes 1D for Ruby

I was intrigued about all the buzz around the Rails framework and the Ruby language, so I thought it was the time to check it out by myself and start by learning Ruby. So, as I usually do, I assigned myself some specific learning task: in this case porting the J4L barcoding software from PHP (which in turn was ported from Java).

Jaume Sola
tag:blog.jaumesola.com,2013:Post/235616 2010-12-01T19:57:00Z 2017-07-10T18:47:45Z Money transfer adventure

During 2010 I worked mostly on this project. J.M.E., the web designer, and I worked with Iker Marcaide to develop the first version of the international money transfer web application, which was launched around June, just in time to win the "HiT Barcelona global technological innovation summit". 

As clients started requesting transfers we refined the user interface until October, moment at which the result was compelling enough for investors to pour into the project its first million dollar funding.

Until this point the service was a generic person-to-person money transfer service. With the new investment and subsequent hiring of the first group of employees, the business focus specialized on tuition payments, and a new application was started with a very different workflow.

This initial web application was developed using the Zend Framework.

It was very exciting to participate in this project and contribute to its early success!

Jaume Sola
tag:blog.jaumesola.com,2013:Post/235617 2009-01-01T20:00:00Z 2017-07-09T13:10:50Z A few things that I do or did
  • WebbyFiles is one of my own projects. What is it?. Discover by yourself: enter the demo and waste some of your time playing with it in the “Tests” folder.
  • In recent years I worked in the development of the server software that provides content to the TomTom HOME desktop software . If you have a TomTom, it’s quite likely that you have been using this software to manage and update your device. If you did, know that millions have done so, but from now on you’re part of the selected group that know that I did something for them!.
  • I occasionally develop web sites, this is one that I’m proud of, in collaboration with a friend graphical designer.
  • Besides my own software, I also distribute software from others. Most of it is under the J4L components brand. Of those, I ported all barcoding components from Java to PHP. These are: multiple 1D barcodes, PDF147, DataMatrix, MaxiCode, AztecCode and QRCode (you have on-line demos of them all).
Jaume Sola
tag:blog.jaumesola.com,2013:Post/235618 1999-01-01T20:00:00Z 2017-04-08T15:34:16Z Boring bored post

Let's be clear about this: this post is not for humans. Seriously, if you are human and reached this point please stop reading here, as this post is only for robots, thank you.

Jaume Sola