Sunday 30 December 2012

Responsive Web Design for Menu, Image and Advertisements

This post is the continuation of my previous Responsive Web Design using CSS3. I had explained how to design a basic responsive web page using CSS3 and Modernizr for lower version browsers. In this post we want to explain how to design responsive collapsed navigation menu, images and advertisements grids for different media devices.

Responsive Web Design using CSS3
Read more »
Share:

Saturday 15 December 2012

App Fabric Cache Configuration Scripts

1. Script to Update the Max Buffer Size of AppFabric Cache

AppFabric Cache has a default max buffer size of 8MB. There are certain scenario where we may need this to modify to satisfy our requirements Find below the script to configure the AppFabric Cache Buffer Size. Script below can be used to increase or decrease this preconfigured size.

#Command Line powershell ./UpdateAppFabricCacheBufferSize.ps1 15000000 



#Manual Step before we run any script on Poweshell : Set-ExecutionPolicy Unrestricted



 



Param([int]$maxBufferSize)   



Import-Module DistributedCacheAdministration, DistributedCacheConfiguration   



Function UpdateBufferSizeInConfig ([string]$configFilename, [int]$maxBufferSize) 



{     



    $xml = New-Object XML     



    $xml.Load($configFilename)     



    $transportProperties = $xml.configuration.dataCache.advancedProperties.transportProperties     



    if ($transportProperties -eq $NULL) 



    {       



        $transportProperties = $xml.CreateElement("transportProperties")     



    }     



    $transportProperties.SetAttribute("maxBufferSize", "$maxBufferSize")     



    $xml.configuration.dataCache.advancedProperties.appendChild($transportProperties)     



    $xml.Save($configFilename) 



}   



$tempConfigLocation = "c:\config.xml"  



Use-CacheCluster



Export-CacheClusterConfig -File $tempConfigLocation  



UpdateBufferSizeInConfig $tempConfigLocation $maxBufferSize  



Stop-CacheCluster



Import-CacheClusterConfig -File $tempConfigLocation -Force



Start-CacheCluster




2. Script to configure the Named Cache and than Add Users in allowed client account list.



 



#To add a name cahce and windows account to the Cluster.



 



function CreateNewCache([string]$NewCacheName)



{



    New-Cache -CacheName $NewCacheName -Secondaries 1 -Force



    write-host "Name Cache $NewCacheName is created" -foregroundcolor green



    write-host "The cache config info :" -foregroundcolor green



    Get-CacheConfig $NewCacheName



}



 



function AddUser([string]$DomainnameUsername)



{



    Grant-CacheAllowedClientAccount -Account "$DomainnameUsername"



    write-host "$DomainnameUsername is added" -foregroundcolor green



    write-host "The list of AllowedClientAccounts below:" -foregroundcolor green



    Get-CacheAllowedClientAccounts



}



 



Write-host "Number of Arguments :" $args.Length;



if($args.Length -gt 1)



{



    CreateNewCache($args[0])



    AddUser($args[1])



}



 



if($args.Length -eq 1)



{



    if($args[0] -like "*\*")



    {



        AddUser($args[0])



    }



    else



    {



        CreateNewCache($args[0])



    }



}



 



 



 



 





Both the scripts provided above are very simple to understand and use through poweshell command line, and used for very specific operation. You can enhance these scripts to even configure advanced settings of Windows AppFabric.

Share:

Tuesday 11 December 2012

Responsive Web Design using CSS3

Smartphone revolution brings new features to the web development, it is time to change your website design into a responsive design instead of maintaining a separate mobile version . Responsive design will automatically adjust itself based on the screen size of the media devices. This post explain you how to use CSS 3 @media property and working with Internet Explorer using Modernizr.

Responsive Web Design using CSS3
Read more »
Share:

Tuesday 4 December 2012

Jquery Photo Zoom Plugin

Introducing a new jQuery PhotoZoom plugin, it helps you to view bigger images on mouse over component, this is very useful for media related web applications. You can customize the PhotoZoom container based on your web page design. Very easy to implement just include the plugin using script tag and give required selector, take a look this live demo.
Jquery Photo Zoom Plugin
Read more »
Share: