GGshow reloaded GGshow reloaded

February 10, 2013

Interesting route of 216.81.59.173

Try run this command in your terminal:

traceroute -m 100 216.81.59.173

Or if you are using Windows:

tracert -h 100  216.81.59.173

It gives output like this:

...
 17     *        *        *     Request timed out.
 18   595 ms   619 ms   608 ms  Episode.IV [206.214.251.1]
 19   566 ms   605 ms   703 ms  A.NEW.HOPE [206.214.251.6]
 20   580 ms   658 ms   629 ms  It.is.a.period.of.civil.war [206.214.251.9]
 21   587 ms   648 ms   658 ms  Rebel.spaceships [206.214.251.14]
 22   564 ms   629 ms   619 ms  striking.from.a.hidden.base [206.214.251.17]
 23   565 ms   658 ms   610 ms  have.won.their.first.victory [206.214.251.22]
 24   611 ms   622 ms   619 ms  against.the.evil.Galactic.Empire [206.214.251.25]
 25   564 ms   600 ms   618 ms  During.the.battle [206.214.251.30]
 26   643 ms   641 ms   624 ms  Rebel.spies.managed [206.214.251.33]
 27   575 ms   638 ms   598 ms  to.steal.secret.plans [206.214.251.38]
 28   614 ms   645 ms   612 ms  to.the.Empires.ultimate.weapon [206.214.251.41]
 29   639 ms   688 ms   702 ms  the.DEATH.STAR [206.214.251.46]
 30   596 ms   639 ms   629 ms  an.armored.space.station [206.214.251.49]
 31   562 ms  1452 ms   378 ms  with.enough.power.to [206.214.251.54]
 32   405 ms   389 ms   409 ms  destroy.an.entire.planet [206.214.251.57]
 33   426 ms   438 ms   438 ms  Pursued.by.the.Empires [206.214.251.62]
 34   442 ms   441 ms   449 ms  sinister.agents [206.214.251.65]
 35   436 ms   559 ms   439 ms  Princess.Leia.races.home [206.214.251.70]
 36   417 ms   448 ms   441 ms  aboard.her.starship [206.214.251.73]
 37   430 ms   438 ms   438 ms  custodian.of.the.stolen.plans [206.214.251.78]
 38   452 ms   450 ms   449 ms  that.can.save.her [206.214.251.81]
 39   463 ms   430 ms   427 ms  people.and.restore [206.214.251.86]
 40   444 ms   469 ms   439 ms  freedom.to.the.galaxy [206.214.251.89]
 41   535 ms   438 ms   449 ms  0-------------------0 [206.214.251.94]
 42   437 ms   498 ms   439 ms  0------------------0 [206.214.251.97]
 43   426 ms   438 ms   449 ms  0-----------------0 [206.214.251.102]
 44   436 ms   439 ms   478 ms  0----------------0 [206.214.251.105]
 45   444 ms   438 ms   449 ms  0---------------0 [206.214.251.110]
 46  2227 ms   387 ms   388 ms  0--------------0 [206.214.251.113]
 47   392 ms   581 ms   399 ms  0-------------0 [206.214.251.118]
 48   406 ms   399 ms   398 ms  0------------0 [206.214.251.121]
 49   416 ms   448 ms   449 ms  0-----------0 [206.214.251.126]
 50   416 ms   438 ms   438 ms  0----------0 [206.214.251.129]
 51   435 ms   438 ms   438 ms  0---------0 [206.214.251.134]
 52   445 ms   458 ms   449 ms  0--------0 [206.214.251.137]
 53   437 ms   438 ms   435 ms  0-------0 [206.214.251.142]
 54   612 ms   448 ms   448 ms  0------0 [206.214.251.145]
 55   443 ms   480 ms   448 ms  0-----0 [206.214.251.150]
 56   455 ms   469 ms   494 ms  0----0 [206.214.251.153]
 57   402 ms   398 ms   398 ms  0---0 [206.214.251.158]
 58   415 ms   399 ms   388 ms  0--0 [206.214.251.161]
 59   428 ms   448 ms   433 ms  0-0 [206.214.251.166]
 60   458 ms   440 ms   439 ms  00 [206.214.251.169]
 61   436 ms   458 ms   459 ms  I [206.214.251.174]
 62   429 ms   449 ms   449 ms  By.Ryan.Werber [206.214.251.177]
 63   437 ms   458 ms   447 ms  When.CCIEs.Get.Bored [206.214.251.182]
 64   475 ms   456 ms   471 ms  read.more.at.beaglenetworks.net [206.214.251.185]
 65   437 ms   438 ms   438 ms  FIN [216.81.59.173]

Trace complete.
Filed under: Linux,Windows — Tags: , , , , , , — GG @ 6:37 pm

January 20, 2013

Netbeans will not start? Perhaps it does!

Unable to start Netbeans in Ubuntu, reinstalling it doesn’t help, installing a different version doesn’t help, tried to install from Software Centre, install from terminal apt-get command, install using the offline .sh installer, install different bundle… no luck.

From System Monitor Processes tab, it appears that the Netbeans is running, and the task appear at launcher, but I just can’t find the program on any workspace. Until I found the little 3px line on one of my workspace, on one of the display.

The program window was just too small to be found. No minimum window size? Who know?
Move the cursor onto it, click & drag to resize it, and now I’ve got my Netbeans back.

The program window move the cursor onto it click & drag to resize it Netbeans window

It may happens to any other software that doesn’t have a minimum windows size, or on other operating system. If you have a same problem, don’t reformat your pc 🙂

Filed under: Uncategorized — Tags: , , , — GG @ 8:51 pm

December 27, 2012

Linux command – 1.6 – File size & disk space

df – report file system disk space usage

Show information about the file system on which each FILE resides, or all file systems by default.

Usage:

df [OPTION]... [FILE]...

Options:

-a, --all include dummy file systems
-B, --block-size=SIZE use SIZE-byte blocks
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
-i, --inodes list inode information instead of block usage
-k like --block-size=1K
-l, --local limit listing to local file systems
--no-sync do not invoke sync before getting usage info (default)
-P, --portability use the POSIX output format
 --sync invoke sync before getting usage info
-t, --type=TYPE limit listing to file systems of type TYPE
-T, --print-type print file system type
-x, --exclude-type=TYPE limit listing to file systems not of type TYPE
-v (ignored)
--help display this help and exit
--version output version information and exit

SIZE may be (or may be an integer optionally followed by) one of following:
kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

Example: display available disk space

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vzfs 30G 21G 9.3G 70% /
none 512M 4.0K 512M 1% /dev
/dev/vzfs 30G 21G 9.3G 70% /var/named/run-root/var/run/dbus

du – estimate file space usage

Summarize disk usage of each FILE, recursively for directories.

Usage:

du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F

Options:

-a, --all
write counts for all files, not just directories

--apparent-size
print apparent sizes, rather than disk usage; although the apparent size is usually smaller, it may be larger due to holes in (`sparse') files, internal fragmentation, indirect blocks, and the like

-B, --block-size=SIZE
use SIZE-byte blocks

-b, --bytes
equivalent to `--apparent-size --block-size=1'
-c, --total
produce a grand total

-D, --dereference-args
dereference FILEs that are symbolic links

--files0-from=F
summarize disk usage of the NUL-terminated file names specified in file F

-H
like --si, but also evokes a warning; will soon change to be equivalent to --dereference-args (-D)

-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)

--si
like -h, but use powers of 1000 not 1024

-k
like --block-size=1K

-l, --count-links
count sizes many times if hard linked

-m
like --block-size=1M

-L, --dereference
dereference all symbolic links

-P, --no-dereference
don't follow any symbolic links (this is the default)

-0, --null
end each output line with 0 byte rather than newline

-S, --separate-dirs
do not include size of subdirectories

-s, --summarize
display only a total for each argument

-x, --one-file-system
skip directories on different file systems

-X FILE, --exclude-from=FILE
Exclude files that match any pattern in FILE.

--exclude=PATTERN
Exclude files that match PATTERN.

--max-depth=N
print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize

--time
show time of the last modification of any file in the directory, or any of its subdirectories

--time=WORD
show time as WORD instead of modification time: atime, access, use, ctime or status

--time-style=STYLE
show times using style STYLE: full-iso, long-iso, iso, +FORMAT FORMAT is interpreted like `date'

--help
display this help and exit

--version
output version information and exit

SIZE may be (or may be an integer optionally followed by) one of following:
kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

Examples: display size of a directory

$ du -hs /path/to/dir
9.2G	/path/to/dir

stat – display file or file system status

Usage:

stat [OPTION]... FILE...

Options:

-L, --dereference
follow links

-f, --file-system
display file system status instead of file status

-c --format=FORMAT
use the specified FORMAT instead of the default; output a newâ line after each use of FORMAT

--printf=FORMAT
like --format, but interpret backslash escapes, and do not outâ put a mandatory trailing newline. If you want a newline, include n in FORMAT

-t, --terse
print the information in terse form

--help
display this help and exit

--version
output version information and exit

The valid format sequences for files (without --file-system):
%a Access rights in octal
%A Access rights in human readable form
%b Number of blocks allocated (see %B)
%B The size in bytes of each block reported by %b
%C SELinux security context string
%d Device number in decimal
%D Device number in hex
%f Raw mode in hex
%F File type
%G Group name of owner
%h Number of hard links
%i Inode number
%m Mount point
%n File name
%N Quoted file name with dereference if symbolic link
%o I/O block size
%s Total size, in bytes
%t Major device type in hex
%T Minor device type in hex
%u User ID of owner
%U User name of owner
%w Time of file birth, human-readable; - if unknown
%W Time of file birth, seconds since Epoch; 0 if unknown
%x Time of last access, human-readable
%X Time of last access, seconds since Epoch
%y Time of last modification, human-readable
%Y Time of last modification, seconds since Epoch
%z Time of last change, human-readable
%Z Time of last change, seconds since Epoch

Valid format sequences for file systems:
%a Free blocks available to non-superuser
%b Total data blocks in file system
%c Total file nodes in file system
%d Free file nodes in file system
%f Free blocks in file system
%i File System ID in hex
%l Maximum length of filenames
%n File name
%s Block size (for faster transfers)
%S Fundamental block size (for block counts)
%t Type in hex
%T Type in human readable form

Example: display file system status

$ stat -f /
  File: "/"
    ID: 2b6896ea6511332f Namelen: 255     Type: ext2/ext3
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 2090580    Free: 1663166    Available: 1558309
Inodes: Total: 524288     Free: 421462

Alternative way to display file size using ls command

$ ls -lah filename | awk '{ print $5}'
Filed under: Linux — Tags: , , , , — GG @ 8:53 pm

December 26, 2012

Floating Point Precision

When ASP CInt( ( 0.3 - 0.2 ) * 10 ) gives you 1, but PHP (int) ( ( 0.3 - 0.2 ) * 10 ) gives you 0;

When MySQL SELECT CAST( 3 * ( 1.0 / 3 ) AS SIGNED ) gives you 1, but MSSQL SELECT CAST( 3 * ( 1.0 / 3 ) AS INT) gives you 0;

How accurate the result you can expect from your web application?

floating point

When your web application is built on top of the myth of the floating point, you can’t even expect 0.1 from JavaScript (0.3-0.2), it gives 0.09999999999999998

Filed under: Web — Tags: , , , , , , , , — GG @ 7:30 pm

December 1, 2012

Disassembling HTC Touch 3G

Unlike those wealthy geeks (hint hint), I don’t always have some latest coolest high tech gadgets to unbox.

All I’ve are those broken or antique devices like alarm clocks, electronic toys, radio, laptops, to be assembled.

It all began with ruining my dad’s antique calculator when I was a kid. It wasn’t my fault, he did not keep his screwdrivers away from me, who to blame?

It’s been a long time I didn’t do such thing. My natural instinct is unstoppable again, when my 4 y.o. HTC Touch 3G become untouchable

HTC Touch 3G

* Problem rectified after replaced the broken digitizer with new one.

Filed under: Logs — Tags: , , , , — GG @ 8:51 pm

September 10, 2012

jQuery Windows

Description:
jQuery Windows is a jQuery plugin to build web application platform in web based Windows interface.

License:

Screenshot:
jQuery Windows

Requirements:

  • jquery library
  • jQuery UI
  • jQuery Windows plugin

Demo:

  • Demo 1 – Startup jQuery Windows
  • Demo 2 – Startup jQuery Windows with parameters
  • Demo 3 – jQuery Windows loaded into iframe
  • Demo 4 – Integrating jQuery Windows to existing webpage

Usage:

  1. Include script and stylesheet
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/eggplant/jquery-ui.css" type="text/css" />
    <script src="jquery.windows.min.js"></script>
    <link rel="stylesheet" href="jquery.windows.css" type="text/css" />
  2. startup Jquery Windows
    $().windows();

    or startup with parameters

    $().windows({
        data : 'jquery.windows.json',
        config : {
            backgroundColor:'#000',
            backgroundImage:'wallpaper.jpg',
            backgroundOption:'fill',
            startupFullscreen:false,
            shutdownExitFullscreen:true,
            showFullscreenButton:true,
            showShutdownButton:true
        },
        startupHandler : startup,
        shutdownHandler : shutdown
    });

Parameters:

  • data : path to the web application data file, default ‘jquery.windows.json’
  • config : jQuery Windows interface configurations
    • backgroundColor : desktop background color, default ‘#000’
    • backgroundImage : desktop background image path, default ”
    • backgroundOption : available options [ ‘fill’ / ‘stretch’ / ‘fit’ / ’tile’ / ‘center’ ]
    • startupFullscreen : start full screen mode when startup, default false.
    • shutdownExitFullscreen : exit full screen mode when shutdown, default false.
    • showFullscreenButton : display a full screen button on menu, default false.
    • showShutdownButton : display a shutdown button on menu, default false.
  • startupHandler : event handler function when startup jQuery Windows
  • shutdownHandler : event handler function when shutdown jQuery Windows

Parameters are optional.
startup and/or shutdown function must be exist if startupHandler and/or shutdownHandler is defined.

Data Format:
Web applications and categories data for jQuery Windows stored in JSON data.
Example:

{
    "CATEGORY":[{
        "TITLE":"Category 1",
        "ITEM":[{
            "TITLE":"Application 1-1",
            "PATH":"app11.html"
        },{
            "TITLE":"Application 1-2",
            "PATH":"app12.html",
            "ICON":"gpl.png",
            "WIDTH":"400",
            "HEIGHT":"300",
            "RESIZABLE":"FALSE",
            "SCROLLING":"FALSE",
            "AUTOSTART":"FALSE"
        }]
    },{
        "TITLE":"Category 2",
        "ITEM":[{
            "TITLE":"Application 2-1",
            "PATH":"app21.html",
            "ICON":"app21.png"
        },{
            "TITLE":"Application 2-2",
            "PATH":"app22.html",
            "ICON":"app22.png"
        }]
    }]
}

Parameters are optional.
Detail parameters for separate application window please refer to data format in demo.
Full screen function & button is available only for web browsers which support JavaScript requestFullscreen method.

Download:

August 17, 2012

jQuery – Periodic Table of Elements

Description:

  • JQuery plugin to display a Periodic Table of Elements.
  • Loads element detail from a JSON data file, includes element name, symbol, atomic number, atomic weight, oxidation states, boiling point, melting point, density & etc.
  • With click event handling.

License:

Screenshot:
jQuery Windows
Demo:

Source:

<!DOCTYPE html>
<html>
    <head>
        <title>JQuery - Periodic Table of Elements - Element Selector</title>
        <link rel="stylesheet" type="text/css" href="jquery.pte.dark.css" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script src="http://jquery-pte.googlecode.com/files/jquery.pte.min.js"></script>
    </head>
    <body>
        <input type="text" id="element" name="element" readonly="readonly" onfocus="show_pte()" />
        <br>
        <label for="element">
            <span style="font-size:small;color:#AAA;">Click to select element.</span>
        </label>
        <br><br>
        <script>
            function select_element(element){
                $('.periodic_table').remove();
                $('#element').val(element.ATOMIC_NUMBER);
            }
            function show_pte() {
                $('<div>').addClass('periodic_table').appendTo('body').pte({
                    data : 'jquery.pte.lite.json',
                    config : {
                        x:$('#element').position().left,
                        y:$('#element').position().top,
                        tooltip:false,
                        closable:true,
                        size:24,
                        spacing:1
                    },
                    clickHandler : select_element
                });
            }
        </script>
    </body>
</html>
/*
* jquery.pte.dark.css
* v1.0
*/
.pte_table,.pte_element,.pte_detail {
    box-sizing: border-box;
    ms-box-sizing: border-box;
    webkit-box-sizing: border-box;
    moz-box-sizing: border-box;
    font-family: cursive;
    padding: 0;
}
.pte_table {
    box-shadow: 4px 4px 2px #666;
    border: #999 1px solid;
    background-color: #333;
}
.pte_element {
    border: #999 1px solid;
    background-color: #CCC;
}
.pte_element:hover {
    background-color: #FFF;
}
.pte_title {
    font-size: 1.0em;
    color: #AAA;
}
.pte_label {
    font-size: 0.6em;
    color: #AAA;
}
.pte_number {
    font-size: 0.5em;
    color: #333;
}
.pte_symbol {
    font-size: 0.6em;
    color: #333;
    text-align: center;
}
.pte_close {
    font-size: 0.8em;
    color: #999;
}
.pte_detail {
    background-color: #FFF;
    border: #CCC 1px solid;
    font-size: 0.7em;
    padding: 8px;
}
.pte_detail_label {
    float: left;
    clear: left;
    color: #333;
}
.pte_detail_value {
    float: left;
    clear: right;
    color: #666;
}

Parameters:

  • data – path to the JSON data file.
  • config – configuration.
    • x : position x
    • y : position y
    • size : size of element boxes in pixel
    • spacing : spacing between element boxes in pixel
    • tooltip : display element detail in tooltip when mouse over an element
    • closable : display a [x] and remove the pte when clicked
  • clickHandler – event handler when an element is clicked.

Download:

More examples: (view source to see the source code)

  1. Basic
  2. Style
  3. Config – sizing
  4. Config – positioning
  5. Config – tooltip
  6. Click Handler
  7. Element detail
  8. Text input with element picker
Filed under: JavaScript,JQuery,JSON,Web — Tags: , , , , — GG @ 5:58 pm

April 3, 2012

Debugging PHP application with Netbeans, Xdebug, and Chromium (or Google Chrome) in Ubuntu

  1. Requirements:
    Firstly, we must have Netbeans, Xdebug, Chromium (or Google Chrome) installed.How to check if Xdebug installed?

    user@ubuntu:~$ php -v
    PHP 5.3.6-13ubuntu3.6 with Suhosin-Patch (cli) (built: Feb 11 2012 02:17:16)
    Copyright (c) 1997-2011 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
        with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
  2. Install Xdebug helper extension
    Visit this URL using Chromium (or Google Chrome).
    Press [Add To Chrome] button to install the Xdebug helper extension.
  3. Configure Xdebug helper options
    Under Chrome extensions, Xdebug helper, press Options.
    Select Netbeans for IDE key.
    Add domains to the domain filter whitelist.
  4. Configure Netbeans
    Tools > Options > General > Web Browser, press [Edit] button.
    Press [Add] button to add a new browser, set configuration as below:Process:
    /usr/bin/chromium-browser
    or
    /usr/bin/google-chromeArguments:
    -remote “{URL}” –user-data-dir=~/.cache/chromium
    or
    -remote “{URL}” –user-data-dir=~/.cache/google-chrome[OK]

    Ubuntu Netbean Chromium Debugging

  5. Debugging
    You can now debug a project (Ctrl+F5) or debug a file (Ctrl+Shift+F5)

    Ubuntu Netbean Chromium Debugging

    To control debugger session
    Finish Debugger Session (Shift+F5)
    Continue (F5)
    Step Over (F8)
    Step Into (F7)
    Step Out (Ctrl+F7)
    Run to Cursor (F4)
    or use the buttons in Debug Toolbar

Filed under: Web,Web Browsers — Tags: , , , , , — GG @ 12:08 pm

March 24, 2012

Web Development Environment in Ubuntu Linux

PART 1 – Ubuntu
Ubuntu is a computer operating system based on the Debian Linux distribution and distributed as free and open source software, using its own desktop environment.

  1. Download & install Ubuntu Linux.
  2. Update package index and upgrade OS.
    To update package index
    sudo apt-get update

    To upgrade all installed packages

    sudo apt-get upgrade
  3. Installing software packages
    To install a package
    sudo apt-get install <package-name>

    To remove a package

    sudo apt-get remove <package-name>

PART 2 – LAMP
LAMP is an acronym for a solution stack of free, open source software, referring to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software) and PHP (or sometimes Perl or Python), principal components to build a viable general purpose web server.

  1. Install LAMP
    To install Apache 2, MySQL 5, PHP 5, Apache PHP5 module, PHP MySQL package.
    sudo apt-get install apache2
    sudo apt-get install mysql-server
    sudo apt-get install mysql-client
    sudo apt-get install php5
    sudo apt-get install libapache2-mod-php5
    sudo apt-get install php5-mysql 

    or simply

    sudo apt-get install lamp-server^

    to install all packages below:
    perl-modules apache2 mysql-server-core-5.1 mysql-client-core-5.1 perl libmysqlclient16 libdbi-perl apache2-mpm-prefork apache2.2-common apache2.2-bin apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 ssl-cert libwrap0 mysql-server libapache2-mod-php5 php5-common php5-cli libclass-isa-perl libdbd-mysql-perl libplrpc-perl libhtml-template-perl mysql-common libnet-daemon-perl libpod-plainer-perl libswitch-perl tcpd mysql-client-5.1 mysql-server-5.1 php5-mysql

PART 3 – Optional Packages

  1. Zend Framework Zend Framework is an open source, object oriented web application framework for PHP 5.
    To install Zend Framwork CLI
    sudo apt-get install zend-framework-bin
  2. PHPUnit PHPUnit is a unit testing software framework for PHP.
    To install PHPUnit
    sudo apt-get install php-pear
    sudo pear channel-update pear.php.net
    sudo pear channel-discover pear.phpunit.de
    sudo pear channel-discover pear.symfony-project.com
    sudo pear update-channels
    sudo pear upgrade-all
    sudo pear install --alldeps phpunit/PHPUnit
    sudo apt-get install phpunit

    or

    sudo apt-get install php-pear
    sudo pear update-channels
    sudo pear config-set auto_discover 1
    sudo pear install --alldeps pear.phpunit.de/PHPUnit
    sudo apt-get install phpunit
  3. Xdebug
    Xdebug is a PHP extension which provides debugging and profiling capabilities.
    To install Xdebug
    sudo apt-get install php5-xdebug

    Add the following lines into etc/php5/conf.d/xdebug.ini if it does not exist.

    zend_extension = “/usr/lib/php5/20090626-lfs/xdebug.so”
    xdebug.remote_enable=on
    xdebug.remote_handler=dbgp
    xdebug.remote_host=localhost
    xdebug.remote_port=9000
  4. Optional PHP extensions
    To install PHP extensions
    sudo apt-get install php5-cgi php5-cli php5-curl php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-mysql php5-pgsql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

    * install only which needed.

  5. MySQL GUI tools
    1. Install MySQL Administrator and MySQL Query Browser
      sudo apt-get install mysql-admin
      sudo apt-get install mysql-query-browser

      and/or

    2. Install MySQL Workbench
      sudo apt-get install mysql-workbench
      sudo apt-get install mysql-query-browser

      and/or

    3. Install phpMyAdmin
      sudo apt-get install phpmyadmin

      Add the following line into /etc/apache2/apache2.conf

      Include /etc/phpmyadmin/apache.conf
  6. Integrated Development Environment
    1. Eclipse
      Install Eclipse IDE
      sudo apt-get install eclipse

      Install PHP Development Tools (PDT)

      sudo add-apt-repository ppa:yogarine/eclipse/ubuntu
      sudo apt-get update
      sudo apt-get install eclipse-pdt

      and/or

    2. Netbeans IDE
      Download & install Netbeans IDE
      Install Java
      sudo apt-get install sun-java6-jdk sun-java6-jre

      Download & install Netbeans

      sudo sh ./netbeans-7.1.1-ml-php-linux.sh

      Install Netbeans

      sudo apt-get install netbeans

      Or download & install the Java SE and NetBeans Cobundle

      sudo sh ./jdk-7u3-nb-7_1_1-linux-ml.sh
  7. Web browser debugging tool
    1. Firebug Install Firebug. or
    2. Developer tools in Chromium Browser Install Chromium Browser
      sudo apt-get install chromium-browser

      Press Ctrl+Shift+I to open Developer Tools

  8. Install version control system
    1. Subversion
      Subversion (SVN) is a software versioning and revision control system distributed under an open source license.
      Install Subversion
      sudo apt-get install subversion
      sudo apt-get install libapache2-svn
    2. Git
      Git is a distributed revision control and source code management (SCM) system with an emphasis on speed.
      Install Git
      sudo apt-get install git-core
      sudo apt-get install git-doc
      sudo apt-get install git-svn
      sudo apt-get build-dep git-core git-doc git-svn

PART 4 – Packages version
To check installed packages version

apache2 -v
php -v
mysql -V
phpunit --version
git --version
svn --version
java -version
zf show version
Filed under: Linux,MySQL,PHP,Web,Zend Framework — Tags: , , , , , — GG @ 10:26 pm

January 15, 2012

It is not safe to rely on the system’s timezone settings

Issue:

  • Warning: date() [function.date]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘UTC’ for ‘8.0/no DST’ instead in ___.php on line ___
  • Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘UTC’ for ‘8.0/no DST’ instead in ___.php on line ___
  • ERROR: date.timezone not set in php.ini.

Reason:

  • Timezone must be defined for PHP.

Solution:

  • set timezone within your php code
    date_default_timezone_set("___");

    or

    set timezone in your application php.ini

    date.timezone = "___"
  • Options:

    Africa/Abidjan
    Africa/Accra
    Africa/Addis_Ababa
    Africa/Algiers
    Africa/Asmara
    Africa/Asmera
    Africa/Bamako
    Africa/Bangui
    Africa/Banjul
    Africa/Bissau
    Africa/Blantyre
    Africa/Brazzaville
    Africa/Bujumbura
    Africa/Cairo
    Africa/Casablanca
    Africa/Ceuta
    Africa/Conakry
    Africa/Dakar
    Africa/Dar_es_Salaam
    Africa/Djibouti
    Africa/Douala
    Africa/El_Aaiun
    Africa/Freetown
    Africa/Gaborone
    Africa/Harare
    Africa/Johannesburg
    Africa/Juba
    Africa/Kampala
    Africa/Khartoum
    Africa/Kigali
    Africa/Kinshasa
    Africa/Lagos
    Africa/Libreville
    Africa/Lome
    Africa/Luanda
    Africa/Lubumbashi
    Africa/Lusaka
    Africa/Malabo
    Africa/Maputo
    Africa/Maseru
    Africa/Mbabane
    Africa/Mogadishu
    Africa/Monrovia
    Africa/Nairobi
    Africa/Ndjamena
    Africa/Niamey
    Africa/Nouakchott
    Africa/Ouagadougou
    Africa/Porto-Novo
    Africa/Sao_Tome
    Africa/Timbuktu
    Africa/Tripoli
    Africa/Tunis
    Africa/Windhoek
    America/Adak
    America/Anchorage
    America/Anguilla
    America/Antigua
    America/Araguaina
    America/Argentina/Buenos_Aires
    America/Argentina/Catamarca
    America/Argentina/ComodRivadavia
    America/Argentina/Cordoba
    America/Argentina/Jujuy
    America/Argentina/La_Rioja
    America/Argentina/Mendoza
    America/Argentina/Rio_Gallegos
    America/Argentina/Salta
    America/Argentina/San_Juan
    America/Argentina/San_Luis
    America/Argentina/Tucuman
    America/Argentina/Ushuaia
    America/Aruba
    America/Asuncion
    America/Atikokan
    America/Atka
    America/Bahia
    America/Bahia_Banderas
    America/Barbados
    America/Belem
    America/Belize
    America/Blanc-Sablon
    America/Boa_Vista
    America/Bogota
    America/Boise
    America/Buenos_Aires
    America/Cambridge_Bay
    America/Campo_Grande
    America/Cancun
    America/Caracas
    America/Catamarca
    America/Cayenne
    America/Cayman
    America/Chicago
    America/Chihuahua
    America/Coral_Harbour
    America/Cordoba
    America/Costa_Rica
    America/Cuiaba
    America/Curacao
    America/Danmarkshavn
    America/Dawson
    America/Dawson_Creek
    America/Denver
    America/Detroit
    America/Dominica
    America/Edmonton
    America/Eirunepe
    America/El_Salvador
    America/Ensenada
    America/Fort_Wayne
    America/Fortaleza
    America/Glace_Bay
    America/Godthab
    America/Goose_Bay
    America/Grand_Turk
    America/Grenada
    America/Guadeloupe
    America/Guatemala
    America/Guayaquil
    America/Guyana
    America/Halifax
    America/Havana
    America/Hermosillo
    America/Indiana/Indianapolis
    America/Indiana/Knox
    America/Indiana/Marengo
    America/Indiana/Petersburg
    America/Indiana/Tell_City
    America/Indiana/Vevay
    America/Indiana/Vincennes
    America/Indiana/Winamac
    America/Indianapolis
    America/Inuvik
    America/Iqaluit
    America/Jamaica
    America/Jujuy
    America/Juneau
    America/Kentucky/Louisville
    America/Kentucky/Monticello
    America/Knox_IN
    America/Kralendijk
    America/La_Paz
    America/Lima
    America/Los_Angeles
    America/Louisville
    America/Lower_Princes
    America/Maceio
    America/Managua
    America/Manaus
    America/Marigot
    America/Martinique
    America/Matamoros
    America/Mazatlan
    America/Mendoza
    America/Menominee
    America/Merida
    America/Metlakatla
    America/Mexico_City
    America/Miquelon
    America/Moncton
    America/Monterrey
    America/Montevideo
    America/Montreal
    America/Montserrat
    America/Nassau
    America/New_York
    America/Nipigon
    America/Nome
    America/Noronha
    America/North_Dakota/Beulah
    America/North_Dakota/Center
    America/North_Dakota/New_Salem
    America/Ojinaga
    America/Panama
    America/Pangnirtung
    America/Paramaribo
    America/Phoenix
    America/Port-au-Prince
    America/Port_of_Spain
    America/Porto_Acre
    America/Porto_Velho
    America/Puerto_Rico
    America/Rainy_River
    America/Rankin_Inlet
    America/Recife
    America/Regina
    America/Resolute
    America/Rio_Branco
    America/Rosario
    America/Santa_Isabel
    America/Santarem
    America/Santiago
    America/Santo_Domingo
    America/Sao_Paulo
    America/Scoresbysund
    America/Shiprock
    America/Sitka
    America/St_Barthelemy
    America/St_Johns
    America/St_Kitts
    America/St_Lucia
    America/St_Thomas
    America/St_Vincent
    America/Swift_Current
    America/Tegucigalpa
    America/Thule
    America/Thunder_Bay
    America/Tijuana
    America/Toronto
    America/Tortola
    America/Vancouver
    America/Virgin
    America/Whitehorse
    America/Winnipeg
    America/Yakutat
    America/Yellowknife
    Antarctica/Casey
    Antarctica/Davis
    Antarctica/DumontDUrville
    Antarctica/Macquarie
    Antarctica/Mawson
    Antarctica/McMurdo
    Antarctica/Palmer
    Antarctica/Rothera
    Antarctica/South_Pole
    Antarctica/Syowa
    Antarctica/Vostok
    Arctic/Longyearbyen
    Asia/Aden
    Asia/Almaty
    Asia/Amman
    Asia/Anadyr
    Asia/Aqtau
    Asia/Aqtobe
    Asia/Ashgabat
    Asia/Ashkhabad
    Asia/Baghdad
    Asia/Bahrain
    Asia/Baku
    Asia/Bangkok
    Asia/Beirut
    Asia/Bishkek
    Asia/Brunei
    Asia/Calcutta
    Asia/Choibalsan
    Asia/Chongqing
    Asia/Chungking
    Asia/Colombo
    Asia/Dacca
    Asia/Damascus
    Asia/Dhaka
    Asia/Dili
    Asia/Dubai
    Asia/Dushanbe
    Asia/Gaza
    Asia/Harbin
    Asia/Hebron
    Asia/Ho_Chi_Minh
    Asia/Hong_Kong
    Asia/Hovd
    Asia/Irkutsk
    Asia/Istanbul
    Asia/Jakarta
    Asia/Jayapura
    Asia/Jerusalem
    Asia/Kabul
    Asia/Kamchatka
    Asia/Karachi
    Asia/Kashgar
    Asia/Kathmandu
    Asia/Katmandu
    Asia/Kolkata
    Asia/Krasnoyarsk
    Asia/Kuala_Lumpur
    Asia/Kuching
    Asia/Kuwait
    Asia/Macao
    Asia/Macau
    Asia/Magadan
    Asia/Makassar
    Asia/Manila
    Asia/Muscat
    Asia/Nicosia
    Asia/Novokuznetsk
    Asia/Novosibirsk
    Asia/Omsk
    Asia/Oral
    Asia/Phnom_Penh
    Asia/Pontianak
    Asia/Pyongyang
    Asia/Qatar
    Asia/Qyzylorda
    Asia/Rangoon
    Asia/Riyadh
    Asia/Saigon
    Asia/Sakhalin
    Asia/Samarkand
    Asia/Seoul
    Asia/Shanghai
    Asia/Singapore
    Asia/Taipei
    Asia/Tashkent
    Asia/Tbilisi
    Asia/Tehran
    Asia/Tel_Aviv
    Asia/Thimbu
    Asia/Thimphu
    Asia/Tokyo
    Asia/Ujung_Pandang
    Asia/Ulaanbaatar
    Asia/Ulan_Bator
    Asia/Urumqi
    Asia/Vientiane
    Asia/Vladivostok
    Asia/Yakutsk
    Asia/Yekaterinburg
    Asia/Yerevan
    Atlantic/Azores
    Atlantic/Bermuda
    Atlantic/Canary
    Atlantic/Cape_Verde
    Atlantic/Faeroe
    Atlantic/Faroe
    Atlantic/Jan_Mayen
    Atlantic/Madeira
    Atlantic/Reykjavik
    Atlantic/South_Georgia
    Atlantic/St_Helena
    Atlantic/Stanley
    Australia/ACT
    Australia/Adelaide
    Australia/Brisbane
    Australia/Broken_Hill
    Australia/Canberra
    Australia/Currie
    Australia/Darwin
    Australia/Eucla
    Australia/Hobart
    Australia/LHI
    Australia/Lindeman
    Australia/Lord_Howe
    Australia/Melbourne
    Australia/North
    Australia/NSW
    Australia/Perth
    Australia/Queensland
    Australia/South
    Australia/Sydney
    Australia/Tasmania
    Australia/Victoria
    Australia/West
    Australia/Yancowinna
    Brazil/Acre
    Brazil/DeNoronha
    Brazil/East
    Brazil/West
    Canada/Atlantic
    Canada/Central
    Canada/East-Saskatchewan
    Canada/Eastern
    Canada/Mountain
    Canada/Newfoundland
    Canada/Pacific
    Canada/Saskatchewan
    Canada/Yukon
    CET
    Chile/Continental
    Chile/EasterIsland
    CST6CDT
    Cuba
    EET
    Egypt
    Eire
    EST
    EST5EDT
    Etc/GMT
    Etc/GMT+0
    Etc/GMT+1
    Etc/GMT+10
    Etc/GMT+11
    Etc/GMT+12
    Etc/GMT+2
    Etc/GMT+3
    Etc/GMT+4
    Etc/GMT+5
    Etc/GMT+6
    Etc/GMT+7
    Etc/GMT+8
    Etc/GMT+9
    Etc/GMT-0
    Etc/GMT-1
    Etc/GMT-10
    Etc/GMT-11
    Etc/GMT-12
    Etc/GMT-13
    Etc/GMT-14
    Etc/GMT-2
    Etc/GMT-3
    Etc/GMT-4
    Etc/GMT-5
    Etc/GMT-6
    Etc/GMT-7
    Etc/GMT-8
    Etc/GMT-9
    Etc/GMT0
    Etc/Greenwich
    Etc/UCT
    Etc/Universal
    Etc/UTC
    Etc/Zulu
    Europe/Amsterdam
    Europe/Andorra
    Europe/Athens
    Europe/Belfast
    Europe/Belgrade
    Europe/Berlin
    Europe/Bratislava
    Europe/Brussels
    Europe/Bucharest
    Europe/Budapest
    Europe/Chisinau
    Europe/Copenhagen
    Europe/Dublin
    Europe/Gibraltar
    Europe/Guernsey
    Europe/Helsinki
    Europe/Isle_of_Man
    Europe/Istanbul
    Europe/Jersey
    Europe/Kaliningrad
    Europe/Kiev
    Europe/Lisbon
    Europe/Ljubljana
    Europe/London
    Europe/Luxembourg
    Europe/Madrid
    Europe/Malta
    Europe/Mariehamn
    Europe/Minsk
    Europe/Monaco
    Europe/Moscow
    Europe/Nicosia
    Europe/Oslo
    Europe/Paris
    Europe/Podgorica
    Europe/Prague
    Europe/Riga
    Europe/Rome
    Europe/Samara
    Europe/San_Marino
    Europe/Sarajevo
    Europe/Simferopol
    Europe/Skopje
    Europe/Sofia
    Europe/Stockholm
    Europe/Tallinn
    Europe/Tirane
    Europe/Tiraspol
    Europe/Uzhgorod
    Europe/Vaduz
    Europe/Vatican
    Europe/Vienna
    Europe/Vilnius
    Europe/Volgograd
    Europe/Warsaw
    Europe/Zagreb
    Europe/Zaporozhye
    Europe/Zurich
    Factory
    GB
    GB-Eire
    GMT
    GMT+0
    GMT-0
    GMT0
    Greenwich
    Hongkong
    HST
    Iceland
    Indian/Antananarivo
    Indian/Chagos
    Indian/Christmas
    Indian/Cocos
    Indian/Comoro
    Indian/Kerguelen
    Indian/Mahe
    Indian/Maldives
    Indian/Mauritius
    Indian/Mayotte
    Indian/Reunion
    Iran
    Israel
    Jamaica
    Japan
    Kwajalein
    Libya
    MET
    Mexico/BajaNorte
    Mexico/BajaSur
    Mexico/General
    MST
    MST7MDT
    Navajo
    NZ
    NZ-CHAT
    Pacific/Apia
    Pacific/Auckland
    Pacific/Chatham
    Pacific/Chuuk
    Pacific/Easter
    Pacific/Efate
    Pacific/Enderbury
    Pacific/Fakaofo
    Pacific/Fiji
    Pacific/Funafuti
    Pacific/Galapagos
    Pacific/Gambier
    Pacific/Guadalcanal
    Pacific/Guam
    Pacific/Honolulu
    Pacific/Johnston
    Pacific/Kiritimati
    Pacific/Kosrae
    Pacific/Kwajalein
    Pacific/Majuro
    Pacific/Marquesas
    Pacific/Midway
    Pacific/Nauru
    Pacific/Niue
    Pacific/Norfolk
    Pacific/Noumea
    Pacific/Pago_Pago
    Pacific/Palau
    Pacific/Pitcairn
    Pacific/Pohnpei
    Pacific/Ponape
    Pacific/Port_Moresby
    Pacific/Rarotonga
    Pacific/Saipan
    Pacific/Samoa
    Pacific/Tahiti
    Pacific/Tarawa
    Pacific/Tongatapu
    Pacific/Truk
    Pacific/Wake
    Pacific/Wallis
    Pacific/Yap
    Poland
    Portugal
    PRC
    PST8PDT
    ROC
    ROK
    Singapore
    Turkey
    UCT
    Universal
    US/Alaska
    US/Aleutian
    US/Arizona
    US/Central
    US/East-Indiana
    US/Eastern
    US/Hawaii
    US/Indiana-Starke
    US/Michigan
    US/Mountain
    US/Pacific
    US/Pacific-New
    US/Samoa
    UTC
    W-SU
    WET
    Zulu
    
Filed under: PHP,Web — Tags: , — GG @ 1:33 am
« Newer PostsOlder Posts »

© 2024 GGSHOW | Powered by WordPress