Visualizzazione post con etichetta engrish. Mostra tutti i post
Visualizzazione post con etichetta engrish. Mostra tutti i post

giovedì 2 febbraio 2012

Blog moving

Google announced that it will censor Blogger blogs in some countries upon government request, so I moved the contents of this blog to Wordpress, so update your bookmarks and point to:

http://velenux.wordpress.com

Censorship is bad. But looks like it's good for business, eh, Google?

martedì 10 gennaio 2012

Running Sinatra (and other Rack apps) on Nginx + Unicorn

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

domenica 27 novembre 2011

Broadcom 4313 (14e4:4727) on Fedora 16 - Good news

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

sabato 22 ottobre 2011

Asus EEEPc 1215B black screen after suspend

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

I didn't find the cause, but don't panic if your EEE PC 1215B starts with a black/dead screen after being suspended (Fedora 16 here, but I think it applies to other distros also)

As I said: don't panic. Disconnect the power cord. Disconnect the battery. Wait a few seconds, then reconnect the battery and power cord and turn on your netbook: the screen will wake up :)

martedì 11 ottobre 2011

Broadcom 4313 on Fedora 16 (Linux kernel 3.1.0)

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

mercoledì 24 agosto 2011

Android Honeycomb 3.2 + mtpfs

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

domenica 21 agosto 2011

The many paths to disk UUIDs

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

giovedì 18 agosto 2011

Are Gnome and KDE giving up the desktop battle?

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

lunedì 8 agosto 2011

Logging for HAProxy on CentOS 5.x

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

sabato 6 agosto 2011

Installing Android SDK on Eclipse (Fedora 15)

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

giovedì 4 agosto 2011

Rewriting addresses in Postfix with regular expressions

Today my employer asked me to look into Postfix. We should take an address like root@some.obscure.host.local.lan and make it into root.some.obscure.host@domain.tld.

Looking at the (good) documentation from Postfix, I managed to get a solution. You should change in /etc/postfix/main.cf:

canonical_maps = regexp:/etc/postfix/rewrite

and the /etc/postfix/rewrite file will contain:

/^(.*)@(.*)\.local\.lan$/     ${1}.${2}@domain.tld

mercoledì 20 luglio 2011

Good tip on better font rendering in Fedora

I just finished reading this good tip on how to obtain better font rendering on Fedora.

Results are good, so I just wanted to share the link :)

domenica 17 luglio 2011

Running an external process from Ruby

Running an external process from a Ruby script is quite easy: use backticks (output = `command`) or the %x method (output = %x[command]).

There are more options like system and exec and even more advanced ones like popen, popen3 and popen4 that allow you to manage process stdin/stdout/stderr.

A good resource with more examples is Nate Murray's 6 Ways to Run Shell Commands in Ruby.

mercoledì 13 luglio 2011

Find packages starting with a string with apt or aptitude

Searching for packages with apt-cache or aptitude is quite easy, but what if we want to find a package name starting with a specific string?

With apt-cache:

$ apt-cache search mysql | grep '^mysql'
mysql-cluster-client - MySQL database client (metapackage)
mysql-mmm-agent - Multi-Master Replication Manager for MySQL - agent daemon
mysql-mmm-common - Multi-Master Replication Manager for MySQL - common files
mysql-mmm-monitor - Multi-Master Replication Manager for MySQL - monitoring daemon
mysql-mmm-tools - Multi-Master Replication Manager for MySQL - tools


With aptitude:

$ aptitude search ^mysql
p   mysql-admin  - GUI tool for intuitive MySQL administration
p   mysql-client  - MySQL database client (metapackage)                              
v   mysql-client-4.1  - 
p   mysql-client-5.1  - MySQL database client binaries
i A mysql-client-core-5.1  - MySQL database core client binaries
[...]

venerdì 10 giugno 2011

Compiling Pound 2.6e with openssl-1.0.0d on CentOS 5.6

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

lunedì 6 giugno 2011

Compiling Pound 2.6e on CentOS 5.x

In protest against Google censorship of Blogger blogs in some countries, this post has been moved to Wordpress.

Questo post è stato spostato su Wordpress in protesta contro la censura applicata da Google su richiesta dei governi di alcuni paesi.

sabato 28 maggio 2011

Can't bear with Gnome 3

I finally installed Fedora 15, as anticipated.

And with Fedora 15 comes Gnome 3. I tried using it. But my patience was quite short: they changed a lot of interaction in subtle ways, so the gap with the previous version is not only based on the new graphical aspect, but also on different behavior.

Gnome 3 managed to get me on KDE 4. Problem is: while Gnome 3 is blazing fast, KDE 4 is slow. In the past I tried it on my netbook and I tought it was slow due to hardware shortcomings, but now I'm using it on my 3-core Phenom 2.3GHz with 8Gb RAM and Radeon HD4890 video card (open source drivers).

It's... slow. Painfully slow. Switching desktop it's so slow I checked if it was doing that in software, but desktop effects are active.

But despite Gnome 3 technical superiority, all the glitches at the moment are more important to me than the speed. Maybe I'll try something more exotic, like Openbox + AWN (like AriOS), but for the moment I'll stick with KDE.

I'll give Gnome another chance in a few months...

sabato 9 aprile 2011

Why RAW is your "digital negative"

I had this post in mind for quite a long time now. RAW files are currently viewed as "your digital negative". Let's see how you can "develop" your RAW files to get many different results from a single shot.

Tools I use for my photography elaboration with Linux are:


Other tools I don't use daily, but I should take a look at:


Now, to the images!

Original shot


This is the original shot, as converted by Canon algorithms (RAW embedded preview)


UFraw development


UFraw mostly "auto" settings


UFraw "my" settings


UFraw with more "washed out" (less saturated, light color cooler) look


Luminance HDR (aka QTpfsGUI)


These are "HDR from single file" exports from QTpfsGUI 1.9.3 (project is now named Luminance HDR).

Reinhard '02, key 0.18, phi 1, pregamma 1


Reinhard '05, brightness 4, chromatic adaptation 1, light adaptation 0, pregamma 1


Mantiuk, contrast mapping 0.1, saturation factor 0.8, detail factor 1, pregamma 1


Mantiuk, contrast mapping 0.1, saturation factor 0.8, detail factor 1, pregamma 1.7


Fattal, alpha 0.1, beta 0.8, saturation 1, noise redux 0.582, pregamma 1


Fattal, alpha 0.1, beta 0.814, saturation 1, noise redux 0.682, pregamma 1.2


Fattal, alpha 0.1, beta 0.814, saturation 1, noise redux 0.682, pregamma 1.4


Fattal, alpha 0.102, beta 0.932, saturation 1, noise redux 1, pregamma 1.6


Digital has almost the same options than analog, just give it a try!

mercoledì 9 marzo 2011

Specified key was too long MySQL error creating index

I stumbled across this error while coding my Ultimate RSS Reader[tm]. I was using (admittedly, not the best choice) TEXT fields to store URI for RSS feeds. Anyway, my table looked like this:

mysql> create table simple (ID integer auto_increment primary key 
not null, content text) charset utf8 engine innodb;

Query OK, 0 rows affected (0.07 sec)

mysql> show create table simple;
+--------+---------------------------------------------------------+
| Table  | Create Table                                            |
+--------+---------------------------------------------------------+
| simple | CREATE TABLE `simple` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `content` text,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+--------+---------------------------------------------------------+
1 row in set (0.00 sec)

And my create index query (and error) was something along these lines:

mysql> create unique index `content_idx` on `simple` (content(256));
ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

I didn't understand why 256 (or more) characters were too much for the 767 bytes limit on InnoDB tables. Turns out that UTF8 could use up to 4 bytes for each character, and MySQL 5,1 uses by default 3 bytes for each character (this has changed in MySQL 5.5), then the limit for this value is 255 characters, or 255*3 bytes and (255*3) is less than 767.

By the way, since MySQL 5.0 the VARCHAR data type could host up to 64k characters, so the correct data type for storing your URIs could be something like VARCHAR(4096).

Many thanks to Patrizio, Stardata CEO for clarifying this issue to me!

martedì 11 gennaio 2011

Error compiling ATI Streams SDK on Fedora

I'm working with some OpenCL related things, so I need to install ATI Streams SDK on this machine.

I downloaded the software from ATI Streams website, then extracted it and exported the necessary env vars:

$ tar zxvf /path/to/ati-stream-sdk-v2.3-lnx64.tgz
$ cd ati-stream-*/
$ export ATISTREAMSDKROOT=$(PWD)
$ export ATISTREAMSDKSAMPLESROOT=${ATISTREAMSDKROOT}/samples

At this point I had to patch several makefiles to compile the SDK on my Fedora 13, so here's the patch. Save it as ati-streams.patch, then make sure you are in the ati-streams-sdk folder and launch:

$ patch -p1 < /path/to/ati-streams.patch
patching file samples/opencl/cl/app/BoxFilterGL/Makefile
patching file samples/opencl/cl/app/FluidSimulation2D/Makefile
patching file samples/opencl/cl/app/Mandelbrot/Makefile
patching file samples/opencl/cl/app/NBody/Makefile
patching file samples/opencl/cl/app/SimpleGL/Makefile
patching file samples/opencl/cl/app/Template/Makefile
patching file samples/opencl/cl/app/URNGNoiseGL/Makefile

Then you can launch make to compile the SDK.