Dejan Levec

October, 2009

How to remove Linux from a Mac?

I don’t really see why would you do that, but here is a how to about removing Linux from a Mac. Linux creates few partitions (usually / and swap, it’s also a common practice to have /home partition). Everything would be easy if only Mac OS’s built-in Disk Utility would support deleting Linux partitions. But […]

PHP: file_get_contents timeout

How to set timeout when fetching content from web site with file_get_contents? <?php $context = stream_context_create(array(‘http’ => array(‘timeout’ > 1))); echo file_get_contents(\"\", 0, $context); ?> It’s a good idea to use it with timeout, because otherwise default timeout from php.ini will be used.

RFM12B Module

In the following files you can find code for AVR micro controllers to use this modules. Source (.c) file: [url=/media/kiwi/uploads/hopeTx.c]hopeTx[/url] Source (.c) file: [url=/media/kiwi/uploads/hopeRx.c]hopeRx[/url] PDF file: [url=/media/kiwi/uploads/RFM12B.pdf]RFM12B[/url] [b]RFM12B and AVR – quick start[/b] I found this tutorial when I searched for connecting this module to AVR. You can download the tutorial at: PDF file: [url=][/url] […]

mod_python and MySQLdb

[b]How to install mod_python and MySQLdb in Debian Lenny?[/b] MySQL is one of greatest databases for web sites, and for applications and it\’s probably most used with PHP. Python is a good language for a lot of things. In my case, I needed some daemons, to do certain tasks. Firstly, I tried with PHP, but […]

How to speed up loading of your website

Is your website slow? Do you even realize that it could load faster? Every webmaster tries to make web sites faster, so people will get better user experience. But there are few tricks that not everyone is aware of. [b]How to improve loading speed?[/b] – cache static content (pictures, javascripts, css files) – remove ETag […]

Convert video to FLV with PHP

[b]How to convert video to .flv with php so that it can be played by Flash Player?[/b] This is a simple approach to converting videos to .flv with PHP. For example, users are allowed to upload videos, and then you can play it by Flash Player. [b]Installing FFmpeg[/b] Probably you already have PHP installed, so […]

VPN or how to access US sites abroad

If you live outside US you cannot watch Hulu/CBS/etc. videos on demand because you need US IP. The other reason to use VPN is a secure connection to VPN provider. So your ISP doesn’t know what are you browsing until you are connected to VPN. There is some free and some payable services. Payable usually […]