nexoBlogs network
Anonymous Anonymous

Instalar PHP 5.3 en MAMP

Wednesday, 14 de April del 2010
filed under

Actualización: La nueva versión de MAMP ya trae PHP 5.3 por lo que ya no es necesario hacerlo a mano. Bájate la última versión!

Hola,

A día de escribir este post MAMP viene con la versión 5.2.11 de PHP por lo que no se pueden utilizar muchas de las funciones interesantes que tiene la nueva versión, yo concretamente quería utilizar funciones de fecha como DateTime::createFromFormat() y los namespaces. Para solucionarlo he hecho lo siguiente

A la conciencia vuestra irá si se os rompe la configuración (a mi me va):

Instrucciones para instalar PHP 5.3 en Mac con MAMP

1) Descargar la versión 5.3 de la página de Snapshots a día de hoy este es el fichero comprimido

2) Descomprimir y navegar por terminal hasta el lugar donde se ha descomprimido

3) En la terminal, dentro de la carpeta lanzar el configure con las opciones de vuestro Config:

./configure --with-mysql=/Applications/MAMP/Library --with-apxs2=/Applications/MAMP/Library/bin/apxs --with-gd --with-jpeg-dir=/Applications/MAMP/Library --with-png-dir=/Applications/MAMP/Library --with-zlib --with-freetype-dir=/Applications/MAMP/Library --prefix=/Applications/MAMP/bin/php5 --exec-prefix=/Applications/MAMP/bin/php5 --sysconfdir=/Applications/MAMP/conf/php5 --with-soap --with-config-file-path=/Applications/MAMP/conf/php5 --enable-track-vars --enable-bcmath --enable-ftp --enable-gd-native-ttf --with-bz2=/usr --with-ldap --with-mysqli=/Applications/MAMP/Library/bin/mysql_config --with-sqlite --with-ttf --with-t1lib=/Applications/MAMP/Library --enable-mbstring=all --with-curl=/Applications/MAMP/Library --enable-dbx --enable-sockets --enable-bcmath --with-imap=shared,/Applications/MAMP/Library/lib/imap-2006i --enable-soap --with-kerberos --enable-calendar --with-pgsql=shared,/Applications/MAMP/Library/pg --enable-dbase --enable-exif --with-libxml-dir=/Applications/MAMP/Library --with-gettext=shared,/Applications/MAMP/Library --with-xsl=/Applications/MAMP/Library --with-pdo-mysql=shared,/Applications/MAMP/Library --with-pdo-pgsql=/Applications/MAMP/Library/pg --with-mcrypt=shared,/Applications/MAMP/Library --with-openssl --with-apxs2=/usr/sbin/apxs --with-png-dir=/usr/X11 --with-freetype-dir=/usr/X11

4) Si todo va bien (el punto anterior es la madre del cordero):

make
make install

Si encontráis errores podéis desactivar las librerías que os fallan (si no las necesitáis) y si no en el proyecto Fink podéis descargar un montón de ellas y lanzar los -with-librerira-tal=/sw etc...

Pasar enlaces Youtube a un punto de tiempo específico

Wednesday, 24 de March del 2010
filed under ,

Muchas veces pasamos enlaces de Youtube donde la parte interesante no llega hasta cierto punto. Puedes pasar a tus colegas el enlace para que salte directamente a un minuto y segundo que tu quieras.

Si por ejemplo quieres que un video empieze en el minuto 1 y el segundo 2 tan sólo tienes que añadir al final:

#t=1m02s

Delante de la m los minutos y delante de la s los segundos. Así de fácil. Por ejemplo:

http://www.youtube.com/watch?v=tTJMerul33E#t=1m02s

Desde el enlace anterior saltarás directamente a la escena de la Ostra Azul de la película Loca Academia de Policía.

"Unicomp Customizer" mechanical keyboard review

Tuesday, 23 de March del 2010

Unicomp mechanical keyboardAmong all the facts that remind me that I am getting old, one of them is chatting with other fellows about the technology we were using back when we started working at our first jobs. It has been 16 years since then in my case, and I sometimes find myself talking about how it was like working with a 386 and 4mb of ram, typing lots of text in such a fantastic wordprocessor as it was Wordperfect, switching from Windows 3.1 to Windows 95 and MS Word afterwards --which was such a bad experience in many ways--. I also clearly remember working with Mac OS 8 for the first time at a desktop publishing job, or the first time I played with a Silicon Graphics Octane machine and its Irix companion.

I perfecly recall using various IBM computers back in 1994, among Olivetti's, HP and other unnamed PC clones, and this IBM machines where all about sturdiness and quality of materials. That's when I had my first contact with IBM's model M mechanical keyboards, and I have been in love with them ever since. I have always been a very fast typing guy, and I immediately appreciated the accuracy of the model M keys response. I typed much more quicker with them and they also were a joy to use, perfect for continous typist hard work. I still think there are no better keyboards in the world should you click more than 1000 keys per day.

Now, try to explain marvels about this keyboards to someone ten years younger than you, who has never seen a keyboard more sophisticated than a Logitech one. Tell them about IBM's patented buckling spring "clicky" keys, about real concurrent multi keypresses, about superb tactile feedback. Tell them about these keyboard's lack of fancy multimedia buttons or usb ports... Forget it, they probably won't get it, and of course it's not their fault, as they are also not to blame for having never used a Commodore 64 or a real typewriter.

Despite my love for the mechanical keyboards, I recon I have been using membrane Apple keyboards at home during the last few years, and dull Dell keyboards at all my different works. But this has changed now, at least at my work's cubicle, thanks to the Unicom Customizer keyboard I bought a few days ago.

This keyboard is the real thing

It turns out that this little Unicomp company bought IBM's model M keyboard patents from Lexmark, which in turn bought them from IBM a few years ago, so the keyboards built by Unicomp are the real thing. And it is so true, this Customizer black keyboard has been built with the same technology and equipment the original keyboards were built with, and it shows: super sturdy, noise-clicky, mechanical keyboard heaven. At $69 (plus overseas delivery in my case) it is no cheap, but this keyboard cannot be considered expensive neither, given its construction quality and the fact that it will easily serve me for more than 10 years.

A keyboard is the main tool of my livelihood and one of the main tools of most of my hobbies. It makes sense to try to get the best tool for the job. The three most important parts of a computer in my opinion are the keyboard, mouse, and monitor. CPU? RAM? Hard disk space? I'll take whatever you give me. But the things I interact with on a constant basis, I want those things to be comfortable.

Experiencing a superb mechanical keyboard

The Unicomp Customizer black keyboard comes along also with a Wow factor, which may be a plus for some. I can tell you this old fashion keyboard has grabbed the attention of literally everyone that has come by my place, always in a positive way. When my setup of dual screens full of Vim sessions and the customizer get combined, the result is a powerful hackish, super productive image, it always seems I am working hard, which of course may not be the case, but anyway.

The keys have a lot of weight to them compared to the bland feel of modern keyboards (which usually use some rubber or plastic dome under the keys). The Customizer's keys have little springs in them, and you can feel the keys pushing back on your fingers as you type. You will clearly feel the difference with any other keyboard you've used before. The weight might lead to fatigue though; the keys are harder to press than other keyboards and my hands feel like they're getting a workout in comparison. That's not been my experience so far, so the worry may be unfounded.

The version of the keyboard I got has a modern Super ("windows") modifier key, but you can get a version without even that, if you like. I also ordered command and options keys as an option, should I use the keyboard attached to a mac computer in the future. You have to specify you want this extra keys by filling a comment text field during purchase, though, so remember it if you pretend to do so. The extra cost for this five keys is $10.

Very important to me, as a Vimmer, is the position and size of the Escape key. On the Customizer, Escape is positioned off by itself in the corner as it should be, with a ton of space between itself and the number row, and the Escape key itself is freaking enormous. This is a huge plus in my book. You can't miss Escape on this keyboard. Similarly, all the other keys are the right sizes and in the right places.

Veredict

So how is the Unicomp Customizer? It's solid, standard, unique, and has a nice retro, minimalist style that I personally enjoy. It's also huge, loud, and relatively expensive. Is it worth buying? If you have the money to spend, I think it is. I don't regret the buy at all. When I go to work and start typing on this stunning old school keyboard, I'm always pleasantly surprised.

 

Sources and related links

See photo album »

Reset iTerm preferences to default

Sunday, 07 de March del 2010
filed under , , ,

If you have messed up your iTerm application preferences you can aways return to the factory settings by deleting your iTerm preferences file. Just delete the following file:

rm ~/Library/Preferences/net.sourceforge.iTerm.plist

This will delete your profiles, very useful when you have remapped keys and you can't remember how to go back.

Restore broken hard disk creating an image with Ubuntu

Monday, 01 de March del 2010
filed under , ,

If your boot partition has been damaged and you cannot boot Ubuntu you still might be able to recover your hard disk and save your data by making an image. All you need is the Ubuntu LiveCD and Partimage, an excellent tool for making backups, or the SystemRescueCD.

Here you'll find a detailed explanation on how to use partimage as well:
http://www.psychocats.net/ubuntu/partimage

Instalar Memcache en Mac

Friday, 12 de February del 2010

Instalar el demonio de memcached en Mac no es tan complicado como parece siguiendo estos sencillos pasos.

Primero de todo asegúrate que tienes todos los requisitos

Requisitos para instalar Memcached

  • Un compilador GCC. No te asustes! Viene instalando las XTools de Mac si es que ya no las tienes
  • Descargarte el script de instalación desde topfunky

Instalación del servidor Memcached

Abre una terminal i navega hasta la ruta donde te has descargado el script. Dale permisos de ejecución y ejecútalo. Así:

chmod +x install-memcached.sh
sudo ./install-memcached.sh
echo "export EVENT_NOKQUEUE=1" >> ~/.bash_profile 

La última linea añade al inicio de tu shell la variable de entorno que requiere Memcache. Si durante la compilación ves que algo falla es que el compilador no está bien instalado. Asegúrate de bajarlo e instalarlo correctamente.

Si has instalado correctamente el servidor podrás ver la licencia o el manual de ayuda

memcached -i
memcached -h

Ahora, para arrancar memcached en mac con 100MB de memoria en el puerto 11211 como demonio haz:

memcached -m 100 -p 11211 -d

Puedes conectarte ahora y ver si está funcionando:

telnet 127.0.0.1 11211
	Trying 127.0.0.1...
	Connected to artomb.local.
	Escape character is '^]'.
	stats
	STAT pid 97257
	STAT uptime 10
	STAT time 1266004819
	STAT version 1.1.12
	STAT rusage_user 0.004421
	STAT rusage_system 0.005540
	STAT curr_items 0
	STAT total_items 0
	STAT bytes 0
	STAT curr_connections 1
	STAT total_connections 2
	STAT connection_structures 2
	STAT cmd_get 0
	STAT cmd_set 0
	STAT get_hits 0
	STAT get_misses 0
	STAT bytes_read 7
	STAT bytes_written 0
	STAT limit_maxbytes 104857600
	END
	quit
Connection closed by foreign host.

Para pararlo, tampoco sin misterios, un kill y arreando:

killall memcached

Instalar Memcache para PHP en Mac y scripts MAMP

Si quieres además integrar todo esto en MAMP para que se inicie al arrancar y instalar las librerías PHP hay un tutorial inglés muy bueno en Lullabot

TortoiseSVN for Ubuntu Linux: The real alternative

Sunday, 25 de October del 2009
filed under , ,

RabbitVCS logoI have posted several articles regarding subversion in this blog. If you ask me one thing I like in Windows, then I only have one answer: Tortoise SVN client. This small application is the only thing I love in Windows, for anything else, I'd rather user Mac or Linux.

But now, there is a Linux alternative to Tortoise SVN called RabbitVCS. I've tried it and it works pretty well. This project, formerly NautilusSVN, looks really well and is inspired in the windows tool. By now, it offers a good support for SVN but the aim is to cover other Version Control Systems (VCS), like Git.

RabbitVCS is integrated smartly in the Nautilus context menu, like Tortoise does, and contains all the options you might need. Logs, updates, merge, commit, full checkout... anything... plus you can play in the terminal and create your own scripts!

If you are a developer and you work in a Linux environment, then you need this tool.

 

Rabbit VCS Log viewer

There is still a long way to walk for RabbitVCS but I am sure that in short will be a perfect replacement. We don't have to forget that TortoiseSVN offers many many advanced features (not just the common commands), but if you are a regular developer who works with a small group of developers and you don't have a lot of branches that need to merge, reintegrate and so on, this is definetelly a perfect option.

See photo album »

All ISO-639 language codes for MySQL

Saturday, 05 de September del 2009
filed under ,

If you ever needed a mysql table with all the languages detailed in the ISO-639 language codes, here it is. I took the list from the registration authority and created the table in Mysql.

There are 21 languages that have alternative codes for bibliographic or terminology purposes. In those cases I took the bibliographic ones. The script contains the 2 and 3 letter ISO-639 language codes, as well as the English and French names of the languages.

This is a preview:

CREATE TABLE `i18n_language_codes` (
  `3letter` char(3) NOT NULL COMMENT 'ISO 639-2 Code',
  `2letter` varchar(2) default NULL COMMENT 'ISO 639-1 Code',
  `english_name` varchar(255) default NULL,
  `french_name` varchar(255) default NULL,
  PRIMARY KEY  (`3letter`),
  KEY `2letter` (`2letter`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO i18n_language_codes (3letter,2letter,english_name,french_name) VALUES
('aar','aa','Afar','afar'),
...

Download Mysql languages dump (structure and data):

download the ISO-639 MySQL script here (right click and save)
Note: The file is encoded in UTF-8 (so if you display it in the browser you'll see the letters messed up. Save it!)

Sponsors

Comments

Cómo reiniciar o resetear un ipod colgado (Alie Perry)
Gracias! Me ha funcionado de maravilla! !...(01 Sep)
Cómo reiniciar o resetear un ipod colgado (marg)
graciasssssssss pense que ya lo tenia que tira.......(30 Aug)
Cómo reiniciar o resetear un ipod colgado (RoO)
GENIALISIMO!!! =)...(23 Aug)
Cómo reiniciar o resetear un ipod colgado (akahanga)
gracias buen dato...(20 Aug)
Cómo reiniciar o resetear un ipod colgado (jhon)
no le intente de mil formas y no me dio por favor ayudemen...(20 Aug)

Login

Otros blogs de nexoBlogs: