4/29/15

Taking Advantage Of Bootstrap Mixins

Recently i took care of some css bug. Some transformation effect didnt looked good at IE.




 After examination of  less file i saw following code:

.parnetDetailsButton {
  float: left;  
  margin-top: 50px;  
  margin-left: -14px;  
  font-size: 15px;
  -webkit-transform-origin-x: 23px; 
  -webkit-transform-origin-y: 13px;
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}



Quick look on this code shows that the reason the effect not acting correctly in IE is - missing microsoft prefix on transform and transform-origin  rules. It should be prefixed with "ms"

-ms-transform-origin: 23px 13px;

That can be quickly fixed by adding proper prefix.
But since we already using bootstrap i decided to take advantage of some of bootstrap less mixins:
.rotate and .transform-origin
mixins are like functions in the less language - they can get parameters and give output.
for using mixins we need the utils of bootstrap to be imported in our less file.

@import "../bower_components/bootstrap/less/mixins/vendor-prefixes";


now this code can be written in more accurate way:


.parnetDetailsButton {
  float: left;
  margin-top: 50px;
  margin-left: -14px;
  font-size: 15px;  
  .rotate(90deg);
  .transform-origin(23px 13px);
}



after less compiled it converted to following css:

.parnetDetailsButton {
  float: left;   
  margin-top: 50px; 
 margin-left: -14px;    
  font-size: 15px;  
 -webkit-transform: rotate(90deg);    
  -ms-transform: rotate(90deg);      
   -o-transform: rotate(90deg);        
     transform: rotate(90deg);  
-webkit-transform-origin: 23px 13px;   
  -moz-transform-origin: 23px 13px;    
   -ms-transform-origin: 23px 13px;     
    transform-origin: 23px 13px;
}


11/27/13

starting with Mongodb

Is it complicate to start using MongoDB?
 -Not at all
All you need is
1. Download the latest version of Mongo (i prefer 64-bit for windows)
2. Extract it on some place on your machine (like C:\mongodb)
3. Create a directory where you want your database to be (like C:\mongodb\data\db)

Now, go to Run >cmd and type :
1. cd C:\mongodb\bin\
2. mongod.exe --dbpath "C:\mongodb\data\db"
Now mongoDB console must start:
Anjoy!

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

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...