Friday, January 3, 2014

Powershell commands

This post i am documenting some of powershell quick reference scripts

Get Members of a command
c:> get-service | gm

Get-help CMD-NAME
Example:
c:> get-help start-service

Get-process -name "Name"
Example
c:> get-process -name "outlook"

Get Process - physical directory path
PS C:\Windows\system32> get-process outlook | dir

Directory: C:\Program Files (x86)\Microsoft Office\Office14

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---         3/31/2011   4:08 PM   15933792 OUTLOOK.EXE

c:> get-service -filter * | select -Property name, @{name='ComputerName',expression={$_.name}_

Backbone.js overview

Backbone.js is a library of tools that helps to build client side rich web applications.
Providing
- Models with Key-Value binidng
- Custom Events
- Collections with a rich API of enumerable functions
- Views with declarative event handling
- connects it all to your existing API over a RESTful JSON interface

Client-side backbone.js application
- Router(s)
- Views
- Models
- Collections

JSON data

Server
- RESTful endpoint

Pros
- Fast
- Highly interactive

Cons
- Cannot be indexed by search engines (without extra work)
- Difficult to test (as client side application)
- Security Issues

SPA - Single Page Applications
- Improved User Experience
SPA on Client Side
- User interface
- Logic
- Page Generation

SPA challenges
- Lack of tooling and experience
- SEO
- Working with different browsers

Backbone.js
Routers helps simulate Page changes, support page history and bookmarking.

More ToBe typed....