11/25/13

Starting with gitHub

What are you need to start  use github?
Not much...
1. Install github client (for windows)
2. after installing go to AllPrograms >GitHub > git shell
3. git console should appear.
Now, after you have git installed, lets start with some basic operations:
To get the code from remote repository to local:
1. browse to some directory where you want your local repository to be

2. type: git clone https://github.com/someuser/YOUR_REPO_NAME.git
If all the things is correct - the local repository with all its contents should create.

Congratulation! you just became a git user

11/24/13

Startnig with Nodejs

Nodejs is very light but powerfull server which uses javascript as serverside language. Installation is free and very easy:
1. go to downloads page
2. choose installer compatible with your system type (i prefer MSI installer)
3. (to determine  in windows right click on "my computer" > system type)
4.after short installation  Allprograms->Node.js
Choose nodejs command prompt. type: node ---version
If all the things correct you will get something like this:
Congratulation!!!
You have Installed Node.js





10/23/13

Shortened text directive - angularjs

 In this artricle we will try to create angularjs directive which  will display only first 10 characters of element text and link  that opens the whole text when user clicked on it.

Before clicking: 

After clicking: 


To simplify the example i'm using the code of angular phonecat tuttorial.
In the example we need to display the snippet  property of phone object

html markup:
 
    
 
Directive declaration:
 
/* app\js\directives.js */
var phonecatDirectives = angular.module('phonecatDirectives', []);
phonecatDirectives.directive('zippy', function () { 
    
    return {
      restrict: "E",
      replace: true,
      transclude: false,
      scope: { title:'@zippyTitle' },
      template: '
{{title}}
' , // The linking function will add behavior to the template link: function(scope, element, attrs) { var opened=true; scope.$watch('title',function(newVal, oldVal){ element.html(scope.title.substr(0,10)+' ...'); // Title element var title = angular.element(element.children()[0]), // Opened / closed state opened = true; // Clicking on title should open/close the zippy title.on('click', toggle); }) // Toggle the closed/opened state function toggle() { if(opened) element.text(scope.title) opened = !opened; //element.removeClass(opened ? 'closed' : 'opened'); //element.addClass(opened ? 'opened' : 'closed'); } } }; });

Getting started with docker

It is very simple to get started usig docker. All you need to do-is download the docker desktop for your system Once you get docker syste...