Monthly Archives: June 2014

Working with Visual Studio 2010 and github on Synology

gitInstall the  "GIT server"  package on your Synology Disk Station. Goto the package center and search for the “Git Server” package. Download and install it.

Install GitExtensions on your dev box.

Install the latest msysgit on your dev box.

Install the  "Git Source Control Provider"  Visual Studio 2010 extension on your dev box. In Visual Studio goto Tools -> Extensions and search for “Git Source Control Provider” in the online gallery.

Now SSH to your Synology (either with putty or with a Linux terminal) and execute the following commands:

This will create a so called “bare git” repository. A bare git repository can be used as a central repository to which you push your local repositories.

Ok; now there is a GIT repository created on your Synology. Next create a new Visual Studio solution. Right click the solution name and select “Create Git Repository”. This will add an .git folder to your solution directory and now your solution is in a local Git repository.

Next commit your new solution to the Git repository.Select all files; type your comment and hit “Commit”.

Now push your local repository to the central bare git repository you created earlier. Right click the solution name; choose Git (master) -> Push. The checklist for Git settings will show up if not all settings are valid. For now just click Ok. The Push dialog appears. Specify the remote name; for example: ssh://johndoe@10.0.0.1/volume1/repo1.git

Some useful GIT commands
In Visual Studio goto GIT -> GIT bash; a Bash command prompt will start.
Show available tags:

Create a tag in the GIT bash:

Commit your changes with a message:

Push the tag information:

Delete a tag:

GIT Use Case

Create bare repo on diskstation

On a client clone (initialise) a repository from the dskstation:

[Remote “origin”] can be found in .git/config file; you could add an alias for convenience. A directory repo will be created that contains your files. Add files to your repo directory

Add them to the local stage:

Commit them to the local repo:

Push them to the server repo:

A new branch master will be created. From now on you can use git push (without the origin master)

Share

XDebug NetBeans Apache configuration

So you want to debug your PHP website code with xdebug netbeans? In this post I will explain how to configure XDebug / Apache and NetBeans to start a debug session for your website.

First of all install the necessary components:

Restart the apache webservice and check for any errors:

Create a new website configuration in /etc/apache2/sites-available  :

Update your hosts file so you can easily test this new site .Add the following line to the file /etc/hosts :

Next enable remote debugging with XDebug. Although you just installed XDebug it will be disabled by default.

Create a script index.php  to see your changes to the apache / php configuration in the directory /var/www/xdebugger/www :

Navigate to http://www.xdebugger.tst

xdebugoff

As you can see in the picture above XDebug is not enabled. To enable the XDdebug feature add the following lines (if not already there) to the file /etc/php5/apache2/conf.d/20-xdebug.ini :

Now restart your apache service once more; execute the script and check the xdebug.remote_enable  setting:

Execute

Navigate to http://www.xdebugger.tst

xdebugon

 

Now goto your netbeans IDE and create a new project:

Set the main project to the newly created project:

Next start your first debugging session!

Additonal information about configuring NetBenas can be found here

Share