For Ubuntu: Create a script in init.d called lampp sudo gedit /etc/init.d/lampp Paste this code on the script and save #!/bin/bash /opt/lampp/lampp start Give -x permissions to the file sudo chmod +x /etc/init.d/lampp Use update-rc.d to install init scripts to all runlevel by typing sudo update-rc.d lampp defaults For CentOS: Open /etc/rc.local using command vi […]

First turn on your computer and access to BIOS immediately . If you don’t know how, please visit this article. After you get in BIOS, open Advanced tab > Restore on AC/Power Loss. Make sure that its value is “Power On“ Finally, Save & exit. If you like to give it a test, unplug your computer […]

Asus notebook, desktop, and laptop

  • Press F2 immediately after powering on.

Acer – Aspire, Power, Veriton, Extensa, Ferrari, TravelMate, Altos

  •     Press Del or F2 immediately after powering on.
  •     The BIOS on the Acer Altos 600 server uses the Ctrl+Alt+Esc key and the F1 key for advanced options.
  •     Older Acer computers may use also use the F1 or Ctrl+Alt+Esc keys to access BIOS.

Compaq – Presario, Prolinea, Deskpro, Systempro, Portable

  •     Press F10 while the cursor in the top right corner of the screen is blinking.
  •     Older Compaq computers may use the F1, F2, F10, or Del key to give access to BIOS.

Continue reading

First of all, you have to make sure that rpmforge repo installed. If not, here is how :

Open the terminal, and enter the following commannds :

Now you have rpmforge repo installed. Then you start install NTFS driver for CentOS by usinig the following command:

  • yum install fuse fuse-ntfs-3g
  • Try this if your rpmforge repo is disabled by default:   yum –enablerepo=rpmforge install fuse fuse-ntfs-3g

After this, you are able to plug any NTFS USB or device to your CENTOS. Enjoy !!!

 

Continue reading

What is black holes? National geographic did really good job of explanation in this documentary.  

Albert Einstein was a German-born theoretical physicist who developed the general theory of relativity, one of the two pillars of modern physics. Here is very interesting biography movie about him:  

In printed piano music, the treble and bass clefs help identifying the music notes. their pupose is help piano players to know what key to play and how long to play that key.

Treble Clef

Bass Clef

Continue reading

In piano, beside handling keys with your hand, and your feet called upon to work the pedals to control other aspects of the music. Most of classical pianos have three padals The damper pedal (the far right): this pedal make your note fade away gradually. The soft pedal (the far left): This pedal make your piano sound […]

Here is the Regex rule that matches any text surround by double quote “(?>(?:[^”]+|””)*)” Regex rule that match any <div> tag: <div[^>]*> Match any empty space (For Eclipse) ^s*n  Match a html tag with atributes <tag name[^>]*?(/?)>  ex:  <table[^>]*?(/?)>, or <td[^>]*?(/?)>

Create a PHP file with the content: <?php $filecontent = file_get_contents ( ‘report.html’ ); $filecontent = preg_replace ( ‘/(<(?!img)w+[^>]+)(style=”[^”]+”)([^>]*)(>)/’, ‘${1}${3}${4}’, $filecontent ); echo $filecontent; ?> If you have access to your linux server’s terminal, run the the following command: php regex.php > new.html If not, you can run the php file in browser and press Ctrl-U […]

Create a PHP file with the content: <?php $filecontent = file_get_contents(‘index.html’);$filecontent = preg_replace(‘/ .*”.*”/’, ”, $filecontent); echo $filecontent; ?> If you have access to your linux server’s terminal, run the the following command: php regex.php > new.html If not, you can run the php file in browser and press Ctrl-U to view the source code, then […]

Install Text editor – Vim from here Open the file you like to modify in Vim. Enter the following for convert to uppercase  :%s/</=(w+)>/U&/g Enter the following for convert to lowercase :%s/</=(w+)>/L&/g

Click Start then search Run application or Press Windows key + R, Type regedit and press Enter. This will open the Registry Editor of Windows.  In the registry, expand HKEY_CURRENT_USER > Control Panel > Keyboard.In the Keyboard folder, Change “InitialKeyboardIndicators” with the below values base your need:  0 => Num Lock is turned OFF after the logon. 1 => […]

Here is how to get auto-complete working in Eclipse PDT with the new version.  Especially since it is different from the last way I did it.  This works in BOTH controllers and Models.  This unfortunately does not automatically include CUSTOM libraries, controllers, or models… but it does take care of all the CORE classes built into Codeigniter. Please follow the following steps:

  • First of all make sure you have the following applications installed in your computer: 
  • Extract the CodeIgniter from zip file, and name it with “***_BASE”
  • Open Eclipse, then create a new PHP project, and setup the new project like the follwing screenshot:  Continue reading

Referenced from this article.

Here is source code to check Android device rooted.

   /**    * Checks if the device is rooted.    * @return <code>true</code> if the device is rooted, <code>false</code> otherwise.    */

Continue reading

OS X Mavericks

OS X Mavericks (version 10.9) is the latest release of OS X, Apple Inc.’s desktop and serveroperating system for Mac computers. OS X Mavericks was announced on June 10, 2013, at WWDC 2013, and was available for upgrading for free through the Mac App Store on October 22, 2013 Please visit here to see the […]

Here is command line that check current version of Mac OSX Sever:  Full:     sw_vers Only product version:   sw_vers | grep ‘ProductVersion:’  Just version number:   sw_vers | grep ‘ProductVersion:’ | grep -o ‘[0-9]*.[0-9]*.[0-9]*’  

In order to remove index.php from URL when working in Codeigniter framework, you have to make sure .htaccess exsisted. If it’s not, you have to create in the root directory of your project. Then paste the following source code in the file:  RewriteEngine on # Prevent CI index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* […]