Mobil Mewah

Salah satu sumber Inspirasi.

Tuesday, 27 August 2013

Query disabled user in Active Directory

Some times we need to use programing to generate something more faster, especially if you handling more than 100 records of data. This time i need to query user that are disabled in Active Directory. Sure you can see it by search in Active Directory control pane, but i need it to be exported in csv so i can handle it in excell format for futher processing. So here are the script to know who is disabled in Active directory and save it to a csv file. Const ADS_UF_ACCOUNTDISABLE = 2 Set objConnection = CreateObject("ADODB.Connection") objConnection.Open "Provider=ADsDSOObject;" Set objCommand = CreateObject("ADODB.Command") objCommand.ActiveConnection...

Sunday, 11 August 2013

Options list with angular.ui bootstrap

I recently need to generate an options list, which is queried before from database. This is common practice in web / application development, where system provide the value for the options which is created by admin of the application. So in angularJS all purely javascript, we can use for loop, but takes time. We are smart developer right? Here how I did this using angular.ui.bootstrap component . We assume the data will be : var categories = ['red','green','blue']; The data will be generated from your database. How to generate it using REST, is out of the topic for now. And in the view :   <select name="label" id="label" data-ng-model="article.label"...

Monday, 5 August 2013

Windows Domain controller Demotion

I have a windows 2003 Domain controller. I have 3 of the DC from previous installation. Now I need to remove this domain, and I think need to do some clean up with proper way, cannot just shutdown the Domain controller. This is because the Domain Controller have child domain and it getting harder to remove. I documenting the process in here for reference. First in windows 2003 Domain we can have 5 role in 1 server or it called FSMO role. We need to check it belongs to which server and make sure it transfered correctly to other server before it will be the last server to remove. First to check the role server have run this command : c:\>netdom...

NodeJS application Deployment

NPM Logo Recently I prepare to deploy a NodeJS application for server side application. There are some dependency and prerequisite software to be installed, like mongoose lib, ExpressJS lib, and other lib in NodeJS environment. To make this deployment easy, NodeJS come with NPM, which can install all the needed library from a single file called package.json . We just list all the dependency needed by the application, in development and in production...

Sunday, 4 August 2013

AngularJS and ExpressJS Basic Auth

So I have successfully implement the Basic Authentication method with AngularJS as frontend , and using ExpressJS as my REST service provider. Lets dig in the specification first which are : The client will have to sent the Basic authentication header in every XHR request The XHR request will be using the factory $resource in AngularJS The REST service will need to check the Authentication header in every request If no authentication header available, it will response with 401 code If the authentication header available, check against user database, if not match response with 401 code If credential match, continue with next operation The check...

Saturday, 3 August 2013

Authentication in REST Service

Today I try to make authentication working in accessing REST services. I use ExpressJS to server the REST service, of course with NodeJS. There are some options I found to be interesting and to be considered and I will share and Document it in here. Hope this will be useful for other programmers out there. There are 2 options I explore to make authentication : Include the authentication information in the query url.For example, http://api.myservice.com/api/v1/tweet/?user=themaster&apikey=9294023984987249This is the easiest way to generate in any application and is common in all web application Include the authentication information in...

Cassandra DB for High Availability

Cassandra DB Logo I am looking for a database which will eliminate headache when the data growing and when need to scale the server. I want to be able do scaling Horizontal easily and with any size of physical server. Also want to have added capacity as I add new database node to the cluster. Is this possible with old school relational database like Oracle, MSSQL, MYSQL, PostgreSQL . From my experience even using vendor supported database, the...

Friday, 2 August 2013

Using WMI In windows environment

In windows, there are some tools provided by Microsoft called Windows Management Instrumentation (WMI) . Its a service which included in windows server to access the magic in the server, like processor, disk status, network status, OS, software installed and other low level information to windows. It is available in Windows XP, windows 7 , Windows server 2003 and up. But in windows server 2003 the WMI is not installed by default. You should install the WMI provider. To install manually go to control panel >> add remove programs >> add/remove windows component >> management and monitoring tools >> WMI Windows Installer...

Thursday, 1 August 2013

Do we need caching in AngularJS

Angular JS Do we need caching in Angular JS ? Caching in a Web based application can dramatically improve the performance and application loading. But it also hard to to invalidation. With Ajax application like AngularJS, I thinking about do we need cache the ajax response from REST api backend. After some reading and search about web caching, from Web Caching for the credits, I conclude that no need to do the cache in tha application logic....

Page 1 of 2512345Next
Twitter Delicious Facebook Digg Stumbleupon Favorites More