Archive

Archive for the ‘Uncategorized’ Category

Bolsa de Trabajo

May 30, 2013 Leave a comment

(Lima-Perú) Bolsa de Trabajo: Desarrollador PHP

Mayor información:

https://www.beeznest.com/es/bolsa-de-trabajo-desarrolladorphp

Categories: Uncategorized Tags:

Panoramic picture of Miraflores, Lima

Panoramic view of Lima, Peru

Lima, Peru panoramic from 14th floor. See the whole of Lima (including San Lorenzo island and the Andes)

Categories: Uncategorized

Volumen de alertas de Skype en Ubuntu

Si tiene el mismo problema que yo con el audio de Skype que no se escucha bajo Ubuntu, la respuesta está aquí:
http://ubuntuforums.org/showthread.php?p=12440872#post12440872

El problema es que Skype usa Pulse Audio por defecto y que este no se configura por el gestor de volumen normal de Ubuntu. En realidad, si pone su audio a lo máximo, escuchará que sí suena, pero muy muy *muy* bajo.

Para arreglar, basta con instalar un gestor de volumen de Pulse Audio y cambiar el volumen:

sudo apt-get install pavucontrol

pavucontrol

y ahí verá que la prima barra deslizable de volumen se llama “Sonidos del sistema”. Póngala a 100%. Ya está, ahora Skype suena normal (puede probarlo llendo en las opciones de Skype > Alertas > Reproducir el audio de “Llamada entrante”, por ejemplo).

Bueno, queda claro que no debería usar skype en un primer lugar porque no es software libre, pero si tiene que comunicarse con alguien lejos que no tiene un buen teléfono IP con su central para mejorar software libre… queda siendo una alternativa interesante.

Categories: Uncategorized Tags: , ,

Ref: Minimum RSA public key lengths

September 18, 2012 Leave a comment

Just a reference to an interesting article on SSL and guidelines for the length of public keys in RSA before and after December 2013:

http://news.netcraft.com/archives/2012/09/10/minimum-rsa-public-key-lengths-guidelines-or-rules.html

Categories: Uncategorized Tags: ,

Munin 2.0 on Debian

June 25, 2012 2 comments

Munin 2.0 has been released and packaged for Debian, and even backported to Squeeze (from backports.debian.org).

Even though there are still some quirks in this version (or just the Debian packaging), it is far better (more scalable, more powerful and prettier) than version 1.4.

Basically, the following article should cover it all:
http://munin-monitoring.org/wiki/CgiHowto2
, but doesn’t quite achieve it, so far.

Let’s see together how to install it successfully on Debian Squeeze. I will however not cover the agent (Munin Node), as there is no significant difference between basic installation of its 1.4 and 2.0 versions.

As a first significant performance improvement, Munin is now able to use RRDcached (it fairly reduces the disk I/O pressure on RRD files), and it is fairly easy to setup. Just install package rrdcached (who would have guessed?), then add the following options to OPTS in /etc/default/rrdcached:

OPTS="-s munin -l unix:/var/run/rrdcached.sock -b /var/lib/munin/ -B -j /var/lib/munin/journal/ -F"

This will override its defaults. And of course, restart then the daemon.

Adapt /etc/munin/apache.conf to your likings, in this case, we are going to uncomment all cgi and fastcgi-related blocks.

Install packages libapache2-mod-fcgid and spawn-fcgi, then download the following script and install it as an initscript on your system (e.g. as /etc/init.d/spaw-fcgi-munin-graph and running insserv):


http://files.julienschmidt.com/public/cfg/munin/spawn-fcgi-munin-graph
(though this version is still buggy and quite fragile, contact me for a slightly improved version)

apt-get install libapache2-mod-fcgid spawn-fcgi

Add user munin and www-data to group adm, and allow group adm to write to /var/log/munin/munin*-cgi-*.log:

adduser munin adm
adduser www-data adm
chmod g+w /var/log/munin/munin*-cgi-*.log

Add user www-data to group munin and the opposite:

adduser www-data munin; adduser munin www-data

Start the spawn-fcgi-munin-graph service and check it is indeed running.

Enable the fcgid and rewrite Apache modules and restart the Apache2 service.

Customize /etc/munin/munin.conf to your likings, enabling the (Fast)CGI parts.

Whenever monitoring more than a single host, I recommend moving (i.e. commenting and copying) the localhost definition to some new /etc/munin/munin-conf.d/ file per domain (e.g. beeznest.conf), and add your hosts there, with a meaningful domain name.

Open alternatives to Skype

August 21, 2011 2 comments

Note: this post might be considered totally useless by some as there is no clear conclusion or solution. It is a work in progress. It does, however, contain hints at nice things to do to find your own replacement for Skype.

So I’m a Belgian in Peru and I want an alternative to Skype, now that it’s been bought by Microsoft and I really don’t want to be adding to the enormous money fund of Microsoft because I think they don’t do much real good with the money (or what it’s transformed into).

A few websites tell about available alternatives (see references below), but I must admit I’m not convinced by any of these. While the most similar solution (in terms of having the possibility to contact people over the same network for free and being able to reach anywhere in the world – not for free but at a reasonable cost – with a software that is available on Linux, Mac and Windows) would be the Google Voice solution, apparently it’s not available in Peru: I invariably get to the https://www.google.com/voice/help/setupUnavailable page, which tells me I’m not eligible for a Google Voice account.

So the best solution still seems to be to hire a VoIP service that will rent you a telephone number with the possibility for you to connect to their server directly from a physical IP phone, like the excellent good-value Linksys SPA942, but you’ll have to go through a series of trial-and-errors, each time potentially loosing your local number.

Because… did you know that several countries allow you to *buy* (for life) a normal phone number, and have it linked to an IP address of your choice? That’s a very cheap deal, as you are then free from any phone service provider, and just pay to make calls, using whichever service you like. Buying the phone number is generally quite cheap. Like US$80 or so, and then you can just set it up to go through an Asterisk (VoIP) server you could set up for free.

So in the meantime we’re using WeePee, an IP Phone service which we’re happy about (although they suck at internationalizing their services – mostly they suck at having good multi-lingual support staff) as they allow us to make calls from our self-owned landline number with a reasonnable fee (still higher than Skype though, and still not making possible a large network of users like Skype does).

There has been some fuss about developing an equivalent to Skype inside the Free Software Foundation’s high priority projects, but so far it is still lacking a real implementor.

References to alternatives to Skype:

Categories: Uncategorized Tags: ,

HOWTO Rename Munin node without losing history

June 13, 2011 3 comments

This howto describes how to rename a Munin 1.4.x node and/or move it to another domain without losing history, because just renaming the node in /etc/munin/munin.conf will actually just create a new host. It has been tested on Debian Squeeze (would work on Debian Lenny too, at least when using 1.4 backports). You will need at least a basic understanding of how to configure Munin to use it.

  1. Stop the cronjob (rename the /etc/cron.d/munin to something with a dot in the name, e.g: /etc/cron.d/munin.disabled)
  2. Rename the RRD files. The following command does the job (actually, moved the files by hand to the right directory after renaming them):
    for file in /var/lib/munin/localdomain/*.rrd; do mv $file `echo $file|sed ‘s/localhost\.localdomain/saidhost\.example\.net/’`; done
  3. Edit /etc/munin/munin.conf to change the node name accordingly
  4. Enable back the cronjob (renaming /etc/cron.d/munin.disabled to /etc/cron.d/munin)
  5. Wait at least 5 minutes (the time for munin-update to run at least once)
  6. Depending on your setup (if you are using Munin’s CGI mode), you might need to update some file and/or directory permissions
  7. Go to the web interface to check the result
Categories: Uncategorized

HOWTO Use gThumb to rename pictures in Ubuntu 10.10 (Maverick)

March 22, 2011 1 comment

I’m used to gThumb to rename lots of pictures from camera’s filename to something including the date, hour taken and a sequence number, like this one: 2011-02-27–16.24.51_007.JPG.

Basically, simply select pictures you want to rename and press F2 (or Edit->Rename).

Previous to version 2.11, gThumb was using a vastly simpler syntax expression for renaming (they name it Template in the Rename dialog). With 2.11 and up, to get the same, I now have to use the following expression:

%D{%Y-%m-%d–%H.%M.%S}_###%E

Please also note that when changing the Rename dialog, they also made it far slower for fair number of pictures (it might take minutes before the Rename dialog appears). For those who know me, I reported the bug in Launchpad as Pictures renaming slower.

Categories: Uncategorized

Vacantes abiertas para diseñadores y desarrolladores php

February 13, 2011 Leave a comment

Empresa que toma a cargo proyectos importantes de elaboración de aplicaciones web empresariales (Bajo Drupal) y educativos (Bajo Chamilo) , necesita: “Integrador CSS3 y HTML4/5 con mucha energía para integrarse en equipo” y “Desarrollador  PHP5

Detalle:

1. “Integrador CSS3 y HTML4/5 con mucha energía para integrarse en equipo”

Requisitos:

  • experiencia mínima de 2 años (NO PRACTICANTES)
  • conocimiento avanzado de CSS2 y CSS3
  • conocimiento avanzado de comportamientos de navegadores IE6,7,8,9,Chrome y Firefox 3
  • conocimiento avanzado (detallista) de HTML4, XHTML y conocimiento básico e interés en HTML5
  • experiencia previa de maquetación Drupal es un bonus importante
  • el uso eficiente de herramientas de trabajo de software libre como GIMP, Inkscape es un plus pero no es necesario (menor importancia: Blender, Cinelerra, Kdenlive). La voluntad de aprender con estas herramientas es necesaria.

Tiempo de empleo y salario a tratar en la entrevista. Modalidad flexible (A distancia o Presencial). Enviar CV por correo electrónico en formato .pdf (SOBRETODO adjuntar enlaces de diseños web o proyectos realizados anteriormente).  Interesados enviar CV en formato .pdf al E-mail : mmosquera@beeznest.com

2. Desarrollador  PHP5 para trabajar sobre proyectos de software libre (Drupal / Chamilo).

Perfil profesional:

  • EXPERIENCIA MÍNIMA de 3 AÑOS de trabajo en desarrollo PHP5, programación OO, manipulación de bases de datos MySQL
  • Conocimiento avanzado de inglés, herramientas de desarrollo web no-gráficas (clientes FTP/SFTP, SSH, Eclipse, CVS/SVN, …), Linux.

Tiempo de empleo y salario a tratar en la entrevista. Modalidad flexible (A distancia o Presencial). Enviar CV por correo electrónico en formato .pdf (SOBRETODO adjuntar de proyectos realizados anteriormente).  Interesados enviar CV en formato .pdf al E-mail : mmosquera@beeznest.com

Categories: Uncategorized

Leer imagen desde un campo OLE Object de Access con PHP

December 16, 2010 3 comments

Parece una tarea sencilla. Es tan fácil como hacer un query y tomar el dato, pero las cosas siempre se complican cuando se trabaja con formatos cerrados.

La pruebas que he realizado han sido con un archivo Access 2007 con una tabla y un campo del tipo “OLE Object”. Luego agregamos una imagen de prueba de la siguiente manera:

Click en Insert Object

Seleccionamos un archivo y hacemos click en Ok

Con esto ya tenemos nuestra BD access lista para ser consultada.

Ahora, para conectarnos a la  BD Access con PHP usamos AdoDb usand DSN-less de la siguiente manera:

require ‘adodb.inc.php’;

$db =&ADONewConnection(“access”);

$path = ‘/tmp/mydb.mdb’;

$dsn=”Driver={Microsoft Access Driver {*.mdb}};Dbq=$path”;

$db->connect($dsn);

if ($db)  {

$sql = “SELECT image from table”;

$result = $db->Execute($sql);

while (!$rs->EOF) {

$image_data = $rs->fields[0];

}

}

El valor de $image_data contiene el OLE Package que a su vez contiene la imagen agregada, pero el problema aquí es de leer este formato OLE package. Buscando en google encontré algunas  fuentes que dicen poder hacerlo, pero usando aspx, aunque no lo he probado, pues no quiero comprar una licencia de Visual Studio de $800, al parecer hay que buscar dentro del OLE Package unos bytes que definen un archivo de imagen en este caso buscaría los siguientes strings dependiendo el formato del archivo…

 

const string BITMAP_ID_BLOCK = “BM”;
const string JPG_ID_BLOCK = “\u00FF\u00D8\u00FF”;
const string PNG_ID_BLOCK = “\u0089PNG\r\n\u001a\n”;

const string GIF_ID_BLOCK = “GIF8″;
const string TIFF_ID_BLOCK = “II*\u0000″;

 

Pero para leer este stream según esta fuente hay que convertir esta data en utf7 y luego buscar el id de JPG. Como todo esto parece raro lo que hice fue ver el código hex de algunos archivos jpeg usando un programa llamado ghex  (sudo apt-get install ghex). Al abrir diferentes imágenes veremos que se repite estos famosos bytes FFD8FFE0

 

Ahora que tenemos la “llave” solamente tenemos que convertir $image_data a hex usando la función pack y luego hacer lo inverso con unpack:

 

$result     = unpack(‘H*’,$image_data);

$image_to_hex = $result[1];

$jpg_id = ‘ffd8ffe0′;

$pos = strrpos($image_to_hex, $jpg_id);

if ($pos === false) {

echo ‘No es posible generar archivo’;}

else {

$image_to_hex = substr($image_to_hex, $pos,strlen($image_to_hex));

header(‘Content-Type: image/jpeg’);

echo $result_image = (pack(‘H*’,$image_to_hex));

}

Podemos guardar el resultado de $result_image en un archivo usando file_put_contents y eso es todo!

Follow

Get every new post delivered to your Inbox.

Join 38 other followers

%d bloggers like this: