Over the past 18 months I’ve been working on making Ophal perform well at the front-end and have a minimal server-side load, making it quickly evolve as a playground framework (i.e: MeQuejo.PE!, Zophin and develCuy’s blog search engine). Now is time to work on more complex stuff that involves the 3 functions left before a first Ophal beta release:
- Browser’s cache support (partially implemented)
- Session handler (under development)
- File Uploads (a long history above)
Recientemente extremetech.com publicó el artículo “Rakshasa: The hardware backdoor that China could embed in every computer”, que me deja muy preocupado, pero no por la amenaza de seguridad solamente, sino porque resulta muy obvio que hay un interés detrás en el contexto de este tipo de noticias: Quitarnos la libertad.
The last time I’ve used an interactive debugger was in the school, Visual Basic 6.0 used to have a nice one. That was 8 years ago, then I went to scripting and web development so debugging changed dramatically for me. So in PHP is different process, it was a bit tricky to get used to “print_r” debugging style instead of using breakpoints!
So, in the last few days, while struggling with lua-cgic (my first ever Lua extension yet to be completed), I found an I/O bug that forced me to remember: the use of breakpoints, C programming and learn GDB. All those three in a row!
GDB is an interactive debugger, basically you load a program, set breakpoints, run it and wait for the program to stop at some breakpoint. That is obvious for some people, and awesome for others like me :), just have to clarify that everything happens into a console, if you miss the graphic interface, try the GDB GUI called Insight.
It has been 6 years since I have decided to move off shared hosting like Dreamhost and Hostmonster. But never minded that Linode, the VPS suggested by many, would try to fool me like them.
So, what happened? Well, I have deployed a new profile in my ex-linode with Ubuntu Server 12 LTS 64-bits, reinstalled everything from scratch, and rebooted to start fresh. Is a nice feeling, you know? The expectation of a fresh LAMP barbeque after being cooking for a couple of hours. But unfortunately I got a cold pizza! It rebooted with a terrible kernel panic… so decided to contact support, willing to get good feedback. But this was the answer:
Linode says: “It seems that an OS update between then and now has caused this issue. At this point, I would suggest redeploying your Linode and copying over any files you need.
If you wish to continue to troubleshoot this issue, you may want to reach out to our active user community.”
Man, I did that already, the old Ubuntu 10 profile was dead, why should I cook a new one if there lots of nicer things to do?… so I highlighted that, but the answer was hilarious:
Image Magick is an awesome tool that also does a great work compressing PDF files.
Just run the following command:
$ convert -compress jpeg -density 150 file.pdf file-compressed.pdf
Notice that -compress is the compression type, and -density is the image quality. Also, JPEG compression is lossy, and reduction of DPI usually is lossy. But I managed to have good compression quality with these settings.
There are more details in the Image Magick manual.
Menu Token has good reception in the community, thanks to hardworker co-maintainers and great patches from the community!
Now is time to make an small pause and think about the future.
So, following feature requests given me an idea on what would be the next steps:
- Features integration: http://drupal.org/node/1289302
- Additional tokens: http://drupal.org/node/973882
- Selectively expand menus with tokens: http://drupal.org/node/978948
Of course I want to see them implemented.
With the purpose of testing Ophal in a real use case, just implemented a proof of concept.
The result is the pre-alpha of: MeQuejo.PE, which seems to be a news aggregator, but it really is a list of search results provided by Google Custom Search API, thanks to a search engine with several custom criteria. Such results are consumed with the help of Lua Spore module.
Con el fin de probar Ophal en un caso de uso real, acabo de implementar una prueba de concepto.
El resultado es el pre-alpha de: MeQuejo.PE, que a simple vista parece un agregador de noticias, pero en realidad es un listado de resultados de búsqueda provistos por Google Custom Search API, gracias a un motor de búsqueda con varios criterios personalizados. Dichos resultados son consumidos con la ayuda del módulo Lua Spore.
1. Install dependencies
# apt-get install php5-dev
2. Download xhprof source
$ cd /tmp
$ git clone git://github.com/facebook/xhprof.git
3. Install xhprof PHP extension
$ cd xhprof/extension
# make install
# echo “extension=xhprof.so” > /etc/php5/conf.d/xhprof.ini
# echo “xhprof.output_dir=/tmp” >> /etc/php5/conf.d/xhprof.ini
# service apache2 restart
4. Install XHProf module in Drupal
- Install in Drupal 6.x
# cp -a /tmp/xhprof/xhprof_* /var/www/
$ cd myproject
There was a time when using OpenDNS was of amazing help, a time when CDNs and geoIP were just emerging. Now those technologies are mandatory for our social media lifes. So some weeks ago I have experienced issues accessing many sites that used Akamai CDN: facebook.com, apple.com to highlight some. Then, after googling for a while, found some interesting articles: