Skip navigation

var Remote = require('ripple-lib').Remote;
var Amount = require('ripple-lib').Amount;

var MY_ADDRESS = 'public_key';
var MY_SECRET = 'private_key';

var SPURKLE = 'gateway_public_key';

var remote = new Remote({
// trace: true,
trusted: true,
local_signing: true,
secure: true,
servers: [
host : '',
port : 443,
ssl : true

console.log( 'Starting: %s', JSON.stringify( remote.servers ) );

remote.connect( function() {

console.log( 'Connected.' );

// remote.on('transaction_all', transactionListener);

// remote.on('ledger_closed', ledgerListener);

remote.set_secret( MY_ADDRESS, MY_SECRET );

var transaction = remote.transaction();

taker_pays: { currency: 'EUR', value: '1', issuer: SPURKLE },
taker_gets: { currency: 'USD', value: '1.3', issuer: SPURKLE }

transaction.submit( function( err, res ) {

console.log( JSON.stringify( err, null, 4 ) );

console.log( JSON.stringify( res, null, 4 ) );


function transactionListener (transaction_data) {
// handle transaction_data
// see for the format of transaction_data

function ledgerListener (ledger_data) {
// handle ledger_data
// see for the format of ledger_data

git push origin 7b60af4738e866eb3ddbcb1073ef8f2946db9f9c:master

Note that all commits before the specified one are also pushed. If you want to push just one commit, rebase -i first and then move the wanted commit at the top of the queue.

git checkout [commit hash]
git checkout -b new_branch

You can then rebase that against your mainline when you are ready to merge those changes:

git checkout new_branch
git rebase master
git checkout master
git merge new_branch

vcaruso@vcaruso-mba:~/workspace$ git clone
vcaruso@vcaruso-mba:~/workspace$ cd ripple-rest/
vcaruso@vcaruso-mba:~/workspace/ripple-rest$ npm install

Note that if DATABASE_URL is not defined, you’ll get the following:
No DATABASE_URL specified, defaulting to sqlite3 in memory. DO NOT USE THIS FOR A PRODUCTION SYSTEM

which means that ripple-rest will run with sqlite3, which is perfectly fine for dev purposes. However, you still need to create a config.js to explicitly say that you want to run sqlite3:

vcaruso@vcaruso-mba:~/workspace/ripple-rest$ cat config.json
"config_version": "0.0.1",
"PORT": 5990,
"NODE_ENV": "development",
"HOST": "localhost",
"ssl": {
"key_path": "./certs/server.key",
"cert_path": "./certs/server.crt"
"rippled_servers": [
"host": "localhost",
"port": 443,
"secure": true

At this point, you can start the web server:

Install dependencies with home-brew:

$ ruby -e "$(curl -fsSL"
$ brew update
$ brew install git scons ctag pkg-config protobuf openssl boost
$ ln -s /usr/local/lib/libboost_thread-mt.a /usr/local/lib/libboost_thread.a
$ ln -s /usr/local/lib/libboost_thread-mt.dylib /usr/local/lib/libboost_thread.dylib

Clone and build rippled:

$ git clone
$ cd rippled
$ git checkout master
$ scons

Run tests:

$ brew install node.js
$ npm install
$ npm test

git branch --set-upstream arcpatch-D614 origin/master

git checkout --theirs path/to/file.cpp
git add path/to/file.cpp

1. create feature branch from master:

git checkout -b new_branch

2. commit in local branch…

git add...
git commit...

3. pull into master from remote

git checkout master && git pull

4. rebase master into new_branch

git checkout new_branch && git rebase -i master

5. push changes directly to remote

git push origin HEAD:master

5. OR rebase new_branch into master (or merge)

git checkout master && git rebase new_feature

6. push from local/master to origin/master

git push

Running multiple heads with multiple video cards has usually been a pain under Linux. The only viable option was Xinerama which is a full software solution of awful performances, specially when driving 3 or 4 displays at 2560×1600 resolution each.

After lots of digging around and infinite Xorg reboots I found that Nvidia drivers offers this “Mosaic” mode that allows screen composition natively. Here’s my Xorg.conf that uses this feature:

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"

Section "Files"

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro NVS 295"
BusID "PCI:3:0:0"

Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro NVS 295"
BusID "PCI:4:0:0"

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "BaseMosaic" "True"
Option "MetaModes" "GPU-0.DFP-2: 2560x1600 +0+0, GPU-1.DFP-2: 2560x1600 +2560+0 {rotation=90}, GPU-1.DFP-3: 2560x1600 +4160+0 {rotation=90}"
SubSection "Display"
Depth 24

Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor0"
DefaultDepth 24
Option "BaseMosaic" "True"
Option "MetaModes" "GPU-0.DFP-2: 2560x1600 +0+0, GPU-1.DFP-2: 2560x1600 +2560+0 {rotation=90}, GPU-1.DFP-3: 2560x1600 +4160+0 {rotation=90}"
SubSection "Display"
Depth 24

This is a triple head with the left most display in landscape mode and the two central displays are in portrait mode. I have a right most display attached to a mac mini to keep my view symmetric.

vcaruso@zeus: ~ $ ./a.out
100000 system calls in 13590810 ticks (135.9 ticks/syscall)

vcaruso@zeus: $ netstat -anp | grep 44499
udp 0 0* 28282/exec.bin

vcaruso@zeus: $ lsof -i -n | grep 44499
exec.bin 28282 vcaruso 77u IPv4 25738300 0t0 UDP *:44499

look out for RX-ERR RX-DRP and RX-OVR counters:

netstat -i

In /usr/share/vte/termcap/xterm

change the following line


to something like:


to change it from 80×24 to 197×35

gawk '/^r[0-9]+/ { lines[$3]+=$13 } END { for(j in lines) print lines[j],j }' svn.log | sort -n

netstat –tcp –udp –numeric-ports –listening –program

tshark -r enxt_drops.pcap -qz io,stat,0,"COUNT(tcp.analysis.retransmission)tcp.analysis.retransmission","COUNT(tcp.analysis.duplicate_ack)tcp.analysis.duplicate_ack","COUNT(tcp.analysis.lost_segment)tcp.analysis.lost_segment","COUNT(tcp.analysis.fast_retransmission)tcp.analysis.fast_retransmission"

-z io,stat,interval[,filter][,filter][,filter]...
Collect packet/bytes statistics for the capture in intervals of interval seconds. Interval can be specified either as a whole or fractional second and can be specified with ms
resolution. If interval is 0, the statistics will be calculated over all packets.
NOTE: One important thing to note here is that the field that the calculation is based on MUST also be part of the filter string or else the calculation will fail.

So: -z io,stat,0.010,AVG(smb.time) does not work. Use -z io,stat,0.010,AVG(smb.time)smb.time instead. Also be aware that a field can exist multiple times inside the same
packet and will then be counted multiple times in those packets.

-q When capturing packets, don't display the continuous count of packets captured that is normally shown when saving a capture to a file; instead, just display, at the end of the
capture, a count of packets captured. On systems that support the SIGINFO signal, such as various BSDs, you can cause the current count to be displayed by typing your "status"
character (typically control-T, although it might be set to "disabled" by default on at least some BSDs, so you'd have to explicitly set it to use it).

When reading a capture file, or when capturing and not saving to a file, don't print packet information; this is useful if you're using a -z option to calculate statistics and
don't want the packet information printed, just the statistics.

1. install sysstat

2. enable data collection in /etc/default/sysstat

3. start the service: /etc/init.d/sysstat start

4. run the tool:

root@host: ~ # sar -s 13:01:21 -e 13:01:40 -w
Linux 2.6 03/01/12 _x86_64_ (12 CPU)

13:01:21 proc/s cswch/s
13:01:22 52.00 57557.00
13:01:23 0.00 75695.00
13:01:24 0.00 122679.00
13:01:25 0.00 80109.00
13:01:26 0.00 55006.00
13:01:27 0.00 42990.00
13:01:28 0.00 51180.00
13:01:29 0.00 59459.00
13:01:30 0.00 85123.00
13:01:31 0.00 55906.00
13:01:32 0.00 163697.00
13:01:33 0.00 99772.00
13:01:34 0.00 79942.00
13:01:35 0.00 38069.00
13:01:36 0.00 54133.00
13:01:37 0.00 57068.00
13:01:38 0.00 59709.00
13:01:39 0.00 63427.00
13:01:40 0.00 62869.00
Average: 2.74 71810.00

Delay not, Caesar. Read it instantly.
— Shakespeare, “Julius Caesar” 3,1

Here is a letter, read it at your leisure.
— Shakespeare, “Merchant of Venice” 5,1

[Quoted in “VMS Internals and Data Structures”, V4.4, when
referring to I/O system services.]


You’ll find plenty of guides on the web to root your HTC Desire 2.2.2 with Unrevoked.

I followed one of them and I got stuck with the “Error: failed to get root. Is your firmware too new?”.

This seems to be a recurrent error happening with Unrevoked version 3.32 and HTC Desire with stock firmware.

I got around the problem just by using Unrevoked 3.21. You can get the older version of Unrevoke by searching it on google, or just use the one uploaded here:

Good luck!

Over the past few years I’ve tried many combination: console svn + eclipse, subeclipse, subversive, etc…

With eclipse indigo I think I’ve found the perfect combination: subversive 2.2.2 + subversive java HL connector + java hl 1.6 + svn 1.6.

Installation procedure:

1. Install svn (apt-get install svn)
2. Install the java svn bridge (apt-get install libsvn-java)
3. Install eclipse helios (from
4. Install the subversive plug-in for eclipse (Help->Install New Software->Indigo Repository->Collaboration->Subversive SVN)

1. Add libjavasvn to the JVM library path: add ‘-Djava.library.path=/usr/lib/jni’ to the ‘-vmargs’ section of eclipse.ini
2. Fix the gnome keyring access violation: add ‘password-stores =’ to the ‘[auth]’ section of ~.subversion/config


gawk -F"[= ]" '{ sum = sum + $NF; count = count + 1; if ($NF > max) max = $NF; } END { printf"count=%d avg=%d max=%d\n", count, sum/count, max}'

This script:

  1. specifies the delimiter as a regex
  2. filters input line based on a regex ( regex right after the first single quote)
  3. cycles through fields
  4. tests a field against a regex (if block in the loop)

gawk -F"[=\x01]" '/35=AE.*150=F/ { for (i=1; i<=NF; i=i+2) { if ($i ~/^(52|55|32|31|1117|1121|782|785)$/) { printf "%s,",$(i+1)} } printf "\n" }' file_to_parse.log

root@vcaruso-ubuntu-t5500:/home/vcaruso/src/IntelPerformanceCounterMonitorV1.7# ./pcm.x 1

EXEC : instructions per nominal CPU cycle
IPC : instructions per CPU cycle
FREQ : relation to nominal CPU frequency='unhalted clock ticks'/'invariant timer ticks' (includes Intel Turbo Boost)
AFREQ : relation to nominal CPU frequency while in active state (not in power-saving C state)='unhalted clock ticks'/'invariant timer ticks while in C0-state' (includes Intel Turbo Boost)
L3MISS: L3 cache misses
L2MISS: L2 cache misses (including other core's L2 cache *hits*)
L3HIT : L3 cache hit ratio (0.00-1.00)
L2HIT : L2 cache hit ratio (0.00-1.00)
L3CLK : ratio of CPU cycles lost due to L3 cache misses (0.00-1.00), in some cases could be >1.0 due to a higher memory latency
L2CLK : ratio of CPU cycles lost due to missing L2 cache but still hitting L3 cache (0.00-1.00)
READ : bytes read from memory controller (in GBytes)
WRITE : bytes written to memory controller (in GBytes)

0 1 0.03 0.25 0.12 1.04 319 4131 0.92 0.04 0.07 0.17 N/A N/A
1 1 1.19 1.14 1.05 1.06 105 2803 0.96 0.96 0.00 0.01 N/A N/A
2 1 0.01 0.24 0.06 1.04 208 1152 0.82 0.04 0.08 0.09 N/A N/A
3 1 0.01 0.28 0.04 1.04 18 783 0.98 0.00 0.01 0.11 N/A N/A
4 0 0.03 0.37 0.07 0.48 566 2359 0.76 0.12 0.20 0.13 N/A N/A
5 0 0.12 0.55 0.22 0.76 591 4982 0.88 0.37 0.07 0.11 N/A N/A
6 0 0.01 0.32 0.03 0.48 13 753 0.98 0.00 0.01 0.12 N/A N/A
7 0 0.02 0.37 0.06 0.48 210 1666 0.87 0.08 0.09 0.16 N/A N/A
SKT 0 0.02 0.43 0.04 0.56 1920 17 K 0.89 0.18 0.09 0.15 0.00 0.00
SKT 1 0.20 0.85 0.24 1.05 15 K 25 K 0.39 0.73 0.26 0.04 0.00 0.00
TOTAL * 0.17 0.96 0.18 0.96 17 K 47 K 0.63 0.84 0.09 0.03 0.00 0.00

Instructions retired: 32 M ; Active cycles: 34 M ; Time (TSC): 7144 Kticks ; C0 (active,non-halted) core residency: 18.46 %

PHYSICAL CORE IPC : 0.96 => corresponds to 23.94 % utilization for cores in active state
Instructions per nominal CPU cycle: 0.17 => corresponds to 4.22 % core utilization over time interval

Intel(r) QPI data traffic estimation in bytes (data traffic coming to CPU/socket through QPI links):

SKT 0 178 K 380 K
SKT 1 221 K 42 K
Total QPI incoming data traffic: 823 K QPI data traffic/Memory controller traffic: 0.62

when calling java from a native thread via jni you may run into a synthetic stack overflow exception thrown by the jvm leading to a jvm crash. This may happen if the native’s thread remaining stack size is lower (stack grows downwards) than the reserved stack size defined by the jvm’s options -XXStackYellowPages -XXStackRedPages -XXStackShadowPages. Obviously the native thread doesn’t know of this constraint so it grows its stack until the limit and you may run into troubles if you’re allocating big arrays on the stack.
To solve this issue you may either increase the native thread stack size or decrease the amount of pages reserved by the jvm by tweaking those parameters above.

tcpdump -ieth2 -C1 -s0 host -w capture.pcap

less -R

(F to follow the tail)

Welcome to the desert, originally uploaded by Vincenzo Caruso.

This is a test post from flickr, a fancy photo sharing thing.

I just installed Notes 8 on ubuntu using an IBM prepacked deb package. Everything went smootly, the only issue is related to the fonts. Notes has luxy-courier as the default font, and this font is not installed by default on the ubuntu/debian systems. To fix this issue just install the ttf-xfree86-nonfree package, if you are ok with non-free packages. Otherwise change the default font from Luxy-Courier to Arial or Courier.

Yesterday I’ve upgraded my Lotus Notes to the last version (the 8.0.1). Everything worked fine, the only problem I remarked is that the Notes runtime has been installed into C:/Notes and the Data directory is still in C:/Program Files/IBM/Lotus/Notes/Data, that is the location of the previous install.

Since I’m pretty paranoiac about the directory order in the file system, I wanted to move the Data directory within the C:/Notes directory. I thought this was a hard and long process but, surprisingly, it consists of just changing a line into your Notes.ini file (the one in C:/Notes).

So, if you want to move the Data directory, first copy it to the desired location (copy, not move, just in case you want to rollback the changes). Then change the following line into the Notes.ini file:


Then restart Notes. If everything works fine after the restart, you can also delete the previous Data directory.

If you have Symphony installed with Notes, then you should also tell him that the workspace location has changed. To do so just edit this file: C:\notes\Data\workspace\.config\

changing the following line\:/Notes/Data/workspace

Note that now the data directory points to the new location.

After this everything should run smooth. Enjoy!

Ho appena installato questo pacchetto in debian, gnome-blogger. E’ una piccola applet per gnome-panel, basta registrare l’indirizzo del blog e le credenziali e con due click puoi inviare un nuovo post sul tuo blog. Facile, provare per credere!

Tommy is a complete unmanned car, controlled entirely by a real time jvm. Take a look here:

Another step forward for RTSJ (the Real Time Specification for Java), altough we still need a quad ultra sparc as Tommy’s brain…

La scorsa notte ho fatto l’update della mia debian-box. Al mattino riavvio e mi accorgo che xorg non vuole partire. Spulcio un po nei log e trovo il seguente messaggio:

(EE) Failed to load module "fglrx" (module requirement mismatch, 0)

Mi era già capitato, quindi lestamente ho scaricato la nuova versione del driver (proprietario) fglrx. Si tratta della versione 40.4. Come di consueto lancio l’installer e mi ritrovo un bel messaggio di errore:

Error: ./ does not support version
default:v2:i686:lib::none:2.6.17rtai; make sure that the version is being
correctly set by --iscurrentdistro

Ciò significa che l’installer non riesce ad individuare la versione di Xorg installata sul sistema. Ora vi sono due rimedi a questo problema:

  1. Esportare X_VERSION=x710 (oppure x710_64a se siete a 64 bit) e poi lanciare di nuovo l’installer (per sicurezza lanciatelo con --keep in modo da mantere i file scompattati)
  2. Creare i pacchetti per la vostra distro. Nel mio caso --build-pkg Debian/unstable. Avrete così i tre pacchetti .deb: driver, modulo kernel e gui.

Bene, una volta compilati ed installati i nuovi driver, se siete con server 7.3 vi renderete conto, riavviando il server X, che non avete risolto un bel nulla! Questo perchè il driver viene compilato per la versione 7.1 di xorg e poichè xorg è molto pignolo, prima di caricare il driver fa un controllo della versione e si rifiuta di andare avanti. Per risolvere questo inconveniente basta dire ad xorg di rilassarsi un pò. Aggiungete quindi queste righe al vostro xorg.conf:

Section "ServerFlags"
Option "IgnoreABI" "on"

Riavviate e tutto andrà liscio!

L’onda che travolge i naviganti del web si chiama REST, ed i RESTafarian sono i suoi surfisti:

Beh, da Rastafarian a Restafarian, non c’è male, no?

Mi sono appena loggato su un sistema OpenVMS, un vecchio VAX messo a disposizione da alcuni ragazzi siciliani. Che figata! Ecco il link:

Mi ha fatto venire la curiosità il mio coinquilino Rudolph che ci lavorava negli anni ottanta con questi sistemi. Si dice che VMS sia il sistema operativo meglio ingegnerizzato in assoluto. Un server nel Massachuttes ha raggiunto uptime di oltre 10 anni!!!

L’interprete dei comandi si chiama DCL (DIGITAL Command Language), ultra-intuitivo, usa una grammatica ispirata ai linguaggi naturali, del tipo predicato-oggetto. I comandi assumono quindi questa forma:

show what's going on on 😉

La cosa più entusiasmante è il filesystem che si può distribuire su DECnet ed in cui ogni file è identificato da una stringa del tipo drive::percorso.del.file. Che cosa vi ricorda? URL?? Ed eravamo negli anni ’70!!


Del mio lavoro mi innamorai fin dal primo giorno, benché non si trattasse d’altro, in quella fase, che di analisi quantitative su campioni di roccia: attacco con acido fluoridico, giù il ferro con l’ammoniaca, giù il nichel (quanto poco! un pizzico di sedimento rosa) con dimetilgliossima, giù il magnesio con il fosfato, sempre uguale, tutti i santi giorni: in sé, non era molto stimolante. Ma stimolante e nuova era un’altra sensazione: il campione da analizzare non era più un’anonima polverina manufatta, un quiz materializzato; era un pezzo di roccia, viscera della terra, strappata alla terra per forza di mine: e sui dati delle analisi giornaliere nasceva a poco a poco una mappa, il ritratto delle vene sotterranee.

Per la prima volta dopo diciassette anni di carriera scolastica, di aoristi e di guerre del Peloponneso, le cose imparate incominciavano dunque a servirmi. L’analisi quantitativa, così avara di emozioni, greve come il granito, diventava viva, vera, utile, inserita in un’opera seria e concreta. Serviva: era inquadrata in un piano, una tessera di un mosaico. Il metodo analiticoche seguivo non era più un dogma libresco, veniva ricollaudato ogni giorno, poteva essere affinato, reso conforme ai nostri scopi, con un gioco sottile di ragione, di prove e di errori. Sbagliare non era più un infortunio vagamente comico, che ti guasta un esame o ti abbassa il voto: sbagliare era come quando si va su una roccia, un misurarsi, un accorgersi, uno scalino in su, che ti rende più valente ed adatto.

Da Nichel di Primo Levi