iScroll 4

Yesterday I had a problem, with HTML scrolling DIVs in Webapps. I thought it would be natural in iDevices but Android is allways a problem. But bigger problem ist bigger challenge for me. So I searching web for solution and found great Javascript plugin called “iScroll”. Now its version iScroll 4 released. For usage just download from In HTML just create div with content   … … … …   And insert into HEAD of your document this code <script type="application/javascript" src="iscroll.js"></script><script type="text/javascript">// <![CDATA[ var myScroll; function loaded() { myScroll = new iScroll('wrapper'); } document.addEventListener('DOMContentLoaded', loaded, false); // ]]></script> It automaticly adjust height aned everything else. I got Top and Bottom bar on webapp and scrolling content in middle and everything just works like charm. Thanks for this plugin.
Read More ›

Sudo command php

I’ve got problem to check and mount disk, because sometimes my unix machine disconnect USB disk, so I want to write script that check last disk and mount it. But there was a problem to run system command fdisk to return all disks. So here is solution: – edit or create file nano /etc/sudoers – insert into file Defaults        env_reset   %www-data ALL=(ALL) NOPASSWD: ALL – exit and save You also need sudo installed on system ! Now you can execute sudo script with php command exec() <!--?php $lastLine=exec("sudo fdisk -l",$retVal); ?--> Have a nice day 🙂    
Read More ›