<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
        <?xml-stylesheet type="text/css" href="http://artha.org/blog/styles/feed.css"?>
<title type="html">tech</title>
<link rel="alternate" type="text/html" href="http://artha.org/blog"/>
<link rel="self" type="application/atom+xml" href="http://artha.org/blog/archives/tech/index-atom.xml"/>
<updated>2010-04-22T00:34:56+01:00</updated>
<author>
<name>shammash</name>
<uri>http://artha.org/blog</uri>
</author>
<id>http://artha.org/blog/</id>
<generator uri="http://nanoblogger.sourceforge.net" version="3.3">
NanoBlogger
</generator>

<entry>
<title type="html">urxvt selection2browser</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2010/04/21/index.html#e2010-04-21T12_18_03.txt"/>
<id>http://artha.org/blog/archives/2010/04/21/index.html#e2010-04-21T12_18_03.txt</id>
<published>2010-04-21T12:18:03+01:00</published>
<updated>2010-04-21T12:18:03+01:00</updated>
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
Sometimes I need to open a few links from the terminal which are just words, so
it's almost impossible to have them recognized by urxvt url matcher. This is
why I've done this small script which allows you to open into your browser a
piece of text previously selected on the terminal.<br><br>

I'm far from being an urxvt expert so if you have better solutions please write
me!<br><br>

<pre>
#! perl

sub on_start {
   my ($self) = @_;

   $self->{browser} = $self->x_resource ("urlLauncher") || "sensible-browser";

   ()
}

sub on_user_command {
   my ($self, $cmd) = @_;

   $cmd eq "selection2browser"
      and $self->exec_async ($self->{browser}, $self->selection);

   ()
}

</pre>

I have this script saved as a file named <b>selection2browser</b> in my
<b>~/.urxvt/perl/</b> directory and in order to activate it via
<b>Ctrl-Alt-w</b> I put the following lines in <b>~/.Xresources</b>:<br><br>

<pre>
URxvt.perl-lib: /home/shammash/.urxvt/perl/
URxvt.perl-ext-common: default,[other stuff],selection2browser
URxvt.keysym.C-M-w: perl:selection2browser
</pre>]]>
</div>
</content>

</entry>
<entry>
<title type="html">tesi specialistica</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2010/03/06/index.html#e2010-03-06T11_40_10.txt"/>
<id>http://artha.org/blog/archives/2010/03/06/index.html#e2010-03-06T11_40_10.txt</id>
<published>2010-03-06T11:40:10+01:00</published>
<updated>2010-03-06T11:40:10+01:00</updated>
<category term="var" />
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
Finalmente, dopo mesi di gestazione[1], sono arrivato a consegnare la tesi di
laurea specialistica.<br>
<br>
<a target=_blank href='/unibo/tesi_specialistica.pdf'>Design e implementazione
del nuovo framework Virtual Distributed Ethernet: analisi delle prestazioni e
validazione sulla precedente architettura.</a><br>
<br>
Buona lettura!<br>
<br>
[1] o,> e (o(<br>
<br>]]>
</div>
</content>

</entry>
<entry>
<title type="html">debrick LiveScribe Pulse</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2010/01/09/index.html#e2010-01-09T16_16_26.txt"/>
<id>http://artha.org/blog/archives/2010/01/09/index.html#e2010-01-09T16_16_26.txt</id>
<published>2010-01-09T16:16:26+01:00</published>
<updated>2010-01-09T16:16:26+01:00</updated>
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
A few days ago my friend <a target=_blank
href='http://giardini.sm/rpd/'>Roberto</a> received his new <a target=_blank
href='http://www.livescribe.com/smartpen/index.html'>LiveScribe Pulse</a>.
After playing a bit with his new toy he decided to attach it to the computer,
but unfortunately the pen got bricked during a firmware upgrade.<br>
<br>
So with my friend <a target=_blank href='http://esaurito.net/blog'>Filippo</a>
we tried to perform various kinds of hard reset, following what's described in
<a target=_blank
href='http://www.livescribe.com/support/kb/?View=entry&EntryID=279'> 29101 -
Mac Master Reset and firmware update utility</a>, but with no success.<br>
<br>
We were about to give up when, just out of curiosity, I decided to attach the
pen to my Linux machine. Using "lsusb -vv" I've discovered that the pen was
stuck in its Device Firmware Upgrade mode waiting for something interesting to
happen.<br>
<br>
Fantastic! We found the pen firmware inside LiveScribe Flash Utility and we
uploaded it using "dfutool" from BlueZ... The pen came back to life, very
good!<br>
<br>
After this forced upgrade the pen was basically working, but it lacked some
functionalities like voice recording. But now official LiveScribe utilities
were able to see the pen, so we re-flashed using them and we obtained a 100%
working device.<br>
<br>
These are the steps we used to flash the LiveScribe Pulse from Linux:<br>
<br>
<pre>
$ wget http://www.livescribe.com/downloads/support/LivescribeSmartpenFlashUtility_2.1.1_Mac.zip
$ unzip LivescribeSmartpenFlashUtility_2.1.1_Mac.zip
$ cd 2.1.1\ Pen\ Flash\ Utility.app/Contents/Resources/Bundles/
$ unzip SystemSoftwareV2.1.1_C.bnd -d SystemSoftwareV2.1.1_C
$ cd SystemSoftwareV2.1.1_C/Files/
$ dfutool upgrade bali_ams3.dfu
Filename  bali_ams3.dfu
Filesize  3365572
Checksum  40559ec9 (valid)

Available devices with DFU support:

  1) Bus 004 Device 002: ID 1cfb:1020 Interface 2

</pre>
<br>]]>
</div>
</content>

</entry>
<entry>
<title type="html">two local interfaces without loopback</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2009/08/29/index.html#e2009-08-29T22_43_55.txt"/>
<id>http://artha.org/blog/archives/2009/08/29/index.html#e2009-08-29T22_43_55.txt</id>
<published>2009-08-29T22:43:55+01:00</published>
<updated>2009-08-29T22:43:55+01:00</updated>
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
Today I was working with <a target=_blank href='http://esaurito.net/blog'>Filippo</a>
on some performance analysis. At some point we<br>
needed to send some traffic between two different interfaces on the same Linux<br>
box, but we did not want the traffic routed through the local loopback.<br>
<br>
The main problem here seems to be the lack of a direct and clean way to say in<br>
Linux: "yes, this address is on this machine, but do not use the local loopback<br>
for the traffic originating from the same host which needs to reach it".<br>
<br>
Different flavours of this problem have been approached in many ways, there is<br>
also a <a target=_blank href='http://www.ssi.bg/~ja/#loop'>Send-To-Self</a> patch
for the kernel.<br>
<br>
So this is my sol^W^Wan hack to achieve that using four IP addresses, NAT, and<br>
a few simple changes to the routing table.<br>
<br>

<pre>
ip l s tap1 up
ip l s tap2 up
ip a a 10.10.1.2/32 dev tap1
ip a a 10.10.2.2/32 dev tap2
ip r a 10.10.2.1/32 dev tap1
ip r a 10.10.1.1/32 dev tap2
iptables -t nat -A POSTROUTING -o tap1 -j SNAT --to-source 10.10.1.1
iptables -t nat -A POSTROUTING -o tap2 -j SNAT --to-source 10.10.2.1
iptables -t nat -A PREROUTING -i tap1 -j DNAT --to-destination 10.10.1.2
iptables -t nat -A PREROUTING -i tap2 -j DNAT --to-destination 10.10.2.2
arp -i tap2 -Ds 10.10.1.1 tap1
arp -i tap1 -Ds 10.10.2.1 tap2
</pre>
<br>]]>
</div>
</content>

</entry>
<entry>
<title type="html">stop software patents world day</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2008/09/24/index.html#e2008-09-24T15_09_33.txt"/>
<id>http://artha.org/blog/archives/2008/09/24/index.html#e2008-09-24T15_09_33.txt</id>
<published>2008-09-24T15:09:33+01:00</published>
<updated>2008-09-24T15:09:33+01:00</updated>
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
<br>
<a href="http://stopsoftwarepatents.org/">
<img alt="http://stopsoftwarepatents.org" src="http://stopsoftwarepatents.wdfiles.com/local--files/banners/banner-x60.png" border="0">
</a>
<br>]]>
</div>
</content>

</entry>
<entry>
<title type="html">native vde support in qemu</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2008/07/02/index.html#e2008-07-02T00_13_21.txt"/>
<id>http://artha.org/blog/archives/2008/07/02/index.html#e2008-07-02T00_13_21.txt</id>
<published>2008-07-02T00:13:21+01:00</published>
<updated>2008-07-02T00:13:21+01:00</updated>
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
The patch is
<a target=_blank href='http://lists.gnu.org/archive/html/qemu-devel/2008-07/msg00026.html'>here</a>.<br>
I hope it will get upstream.<br>]]>
</div>
</content>

</entry>
<entry>
<title type="html">quicksort</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2008/05/06/index.html#e2008-05-06T15_20_04.txt"/>
<id>http://artha.org/blog/archives/2008/05/06/index.html#e2008-05-06T15_20_04.txt</id>
<published>2008-05-06T15:20:04+01:00</published>
<updated>2008-05-06T15:20:04+01:00</updated>
<category term="tech" />
<category term="fun" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
Let's write a quicksort implementation in
<a target=_blank href='http://www.jsoftware.com/'>J programming language</a>..<br>
<br>
<pre>
quicksort=:(($:@(<#[),(=#[),$:@(>#[))({~?@#))^:(1<#)
</pre>
<br>
<i>Many thanks to Vlad! :)</i><br>]]>
</div>
</content>

</entry>
<entry>
<title type="html">A F this K</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2008/04/01/index.html#e2008-04-01T01_29_21.txt"/>
<id>http://artha.org/blog/archives/2008/04/01/index.html#e2008-04-01T01_29_21.txt</id>
<published>2008-04-01T01:29:21+01:00</published>
<updated>2008-04-01T01:29:21+01:00</updated>
<category term="var" />
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
see you :)<br>
<br><br>
<img alt='google.ie' src='http://artha.org/blog/entrimg/ggie.gif'>
<br>]]>
</div>
</content>

</entry>
<entry>
<title type="html">fosdem 2008</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2008/02/15/index.html#e2008-02-15T16_00_04.txt"/>
<id>http://artha.org/blog/archives/2008/02/15/index.html#e2008-02-15T16_00_04.txt</id>
<published>2008-02-15T16:00:04+01:00</published>
<updated>2008-02-15T16:00:04+01:00</updated>
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
Sinceramente questa patacca mi ricorda vagamente i diari delle compagne di<br>
classe delle medie, mediamente piu` alti di tutti i libri di testo impilati.<br>
<br>
Vabbeh, mettiamolo giusto per aggiornare questo blog :)<br>
<br>
<a href="http://www.fosdem.org">
	<img src="http://www.fosdem.org/promo/going-to"
	alt="I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting" />
</a>]]>
</div>
</content>

</entry>
<entry>
<title type="html">a volte ritornano</title>
<author>
<name>shammash</name>
</author>
<link rel="alternate" type="text/html" href="http://artha.org/blog/archives/2008/01/25/index.html#e2008-01-25T21_45_55.txt"/>
<id>http://artha.org/blog/archives/2008/01/25/index.html#e2008-01-25T21_45_55.txt</id>
<published>2008-01-25T21:45:55+01:00</published>
<updated>2008-01-25T21:45:55+01:00</updated>
<category term="tech" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
<pre>
Last login: Wed Dec 24 01:40:40 2003 from 192.168.1.3
</pre>]]>
</div>
</content>

</entry>

</feed>
