Solution for older browser recognizing HTML5 tags

Leave a comment / in HTML, JavaScript / daniyel Tagged , , , , , , , , , , , /

If you ever developed anything for web, you know that many new HTML tags introduced, are not supported by many older browsers, which are still used by some people. Problem mostly goes for Internet Explorer users (I still see people using IE 7 these days). Well solution is to add next javascript fix in your page head tags, but however you will need to use CSS to style this elements suited to your needs:

    <!DOCTYPE html>
    <head>

    <!--[if lt IE 9]>
    <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]--> 

    </head>

free Subversion or Git hosting for your projects

Leave a comment / in SVN / daniyel Tagged , , , , , /

I was looking for a free repository hosting for my private project, so I and my friend could work on it, each form its own home computer, not needing to copy project to some kind of removable drive and share it. My first choice was however GitHub but since free version comes only with open source projects option, I had to widen my search and look for alternative. After looking for a free Subversion or Git hosting for my project I stumbled on Assembla. Only restriction I found so far is space limitation is set to 1GB.

Setting your account is straight forward and very easy. I use NetBeans 7.1.1 and I imported project to Assembla in few clicks.

How to update tickets from commit comments

You can use commit comments to link your changesets to Assembla tickets, and add comments to tickets or change their status.

  • Use “re #4” to link your commit to ticket #4.
  • Also, “references“, “refs” and “see” will add a comment to the target ticket.
  • Use “<status> #4” to set ticket #4 to the target status. For example, “Test #4” or “Fixed #4“.
  • To enter a time record in the Time tool, use “Time: 2h15m

So far everything is working as expected, but I haven’t really tested it to the fullest yet.

How to run two instances of Skype at the same time

Leave a comment / in Skype / daniyel Tagged , , , , , /

If you have need to run two instances of the skype at the same time with two different accounts, run the first instance just by clicking Skype icon and for second one just type next line in “run” application:

"[path_to_your_skype_executable]" /secondary

in my case i typed:

"C:\Program Files (x86)\Skype\Phone\Skype.exe" /secondary

* Notice: watch for the double quotes on the path name!

* EDIT [8/4/2012]: if you feel its time consuming to type previous line into “run” application, just create 2nd shortcut of Skype on your desktop and click on it with right mouse button, got to “Properties”, under “Shortcut” tab paste same line in “Start in” property

Image indicating where to set the command:

Skype 2nd instance

Skype 2nd instance

Setting up PEAR package in WAMP environment

Leave a comment / in PEAR, PHP, WAMP / daniyel Tagged , , , , , , , , /

There are some tutorials or blogs on the internet that are already describing “How to setup PEAR package on WAMP environment”, but after following each and every one of them I stumbled upon some errors and misconfiguration.

My configuration was done on WAMP 2.1 environment (with PHP 5.3.5)

1. step: You will need to setup “php.ini” file, the one from “php5.x.x” directory and not the one from “apache/bin”. Find the line:

;phar.require_hash = On

and change it to:

phar.require_hash = Off

Save the file and run “cmd” as Administrator.

2. step: go to PHP working directory in my case:

C:\wamp\bin\php\php5.3.5>

And type:

php -d phar.require_hash=0 PEAR/go-pear.phar

In next steps I used system (I used local at first but “pear” command was not working from command line even tho I set PATH variable) and watch for system paths (I chose “all” and added PEAR in directory name where applicable). Examples:

C:\wamp\bin\php\php5.3.5\PEAR
C:\wamp\bin\php\php5.3.5\PEAR\pear
C:\wamp\bin\php\php5.3.5\PEAR\www
C:\wamp\bin\php\php5.3.5\PEAR\cfg
C:\wamp\bin\php\php5.3.5\PEAR\docs
etc...

After installation is completed got to “php” folder under “PEAR” directory, find “PEAR_ENV.reg” and run it.

Try typing “pear” in command line if you are getting error (try to close current “cmd” and run new one):

'pear' is not recognized as an internal or external command,
operable program or batch file.

If the problem is still present try adding PEAR path manually in Environment Variables under “Path”:

;C:\wamp\bin\php\php5.3.5\PEAR

If “pear” is still not recognized as command try to reinstall PEAR from beginning.

If “pear” is working you should see next result after typing “pear” command:

C:\>pear
Commands:
build                  Build an Extension From C Source
bundle                 Unpacks a Pecl Package
channel-add            Add a Channel
channel-alias          Specify an alias to a channel name
channel-delete         Remove a Channel From the List
channel-discover       Initialize a Channel from its server
channel-info           Retrieve Information on a Channel
channel-login          Connects and authenticates to remote channel server
channel-logout         Logs out from the remote channel server
channel-update         Update an Existing Channel
clear-cache            Clear Web Services Cache
config-create          Create a Default configuration file
config-get             Show One Setting
config-help            Show Information About Setting
config-set             Change Setting
config-show            Show All Settings
convert                Convert a package.xml 1.0 to package.xml 2.0 format
cvsdiff                Run a "cvs diff" for all files in a package
cvstag                 Set CVS Release Tag
download               Download Package
download-all           Downloads each available package from the default channel
info                   Display information about a package
install                Install Package
list                   List Installed Packages In The Default Channel
list-all               List All Packages
list-channels          List Available Channels
list-files             List Files In Installed Package
list-upgrades          List Available Upgrades
login                  Connects and authenticates to remote server [Deprecated in favor of channel-login]
logout                 Logs out from the remote server [Deprecated in favor of channel-logout]
makerpm                Builds an RPM spec file from a PEAR package
package                Build Package
package-dependencies   Show package dependencies
package-validate       Validate Package Consistency
pickle                 Build PECL Package
remote-info            Information About Remote Packages
remote-list            List Remote Packages
run-scripts            Run Post-Install Scripts bundled with a package
run-tests              Run Regression Tests
search                 Search remote package database
shell-test             Shell Script Test
sign                   Sign a package distribution file
svntag                 Set SVN Release Tag
uninstall              Un-install Package
update-channels        Update the Channel List
upgrade                Upgrade Package
upgrade-all            Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]
Usage: pear [options] command [command-options]
Type "pear help options" to list all options.
Type "pear help shortcuts" to list all command shortcuts.
Type "pear help " to get the help for the specified command.

* Notice: if you get warnings about Structure_Graph do not worry we will get to that in a second.

3. step:

You can not follow step 3 if “pear” command is not working in your “cmd”!!!

Download [PEAR Structures] and extract its content to PEAR folder. Run “cmd” as Administrator and go to PEAR working directory Then run:

C:\wamp\bin\php\php5.3.5\PEAR>pear install -a Structures_Graph

If everything goes well you should see something like this:

downloading Structures_Graph-1.0.4.tgz ...
Starting to download Structures_Graph-1.0.4.tgz (30,318 bytes)
.........done: 30,318 bytes
install ok: channel://pear.php.net/Structures_Graph-1.0.4

After that upgrade PEAR with next command from same working directory:

C:\wamp\bin\php\php5.3.5\PEAR>pear upgrade PEAR

Well that is all to it. I tried to stress out where I had problem with setting up PEAR package. If you have any further question feel free to ask.