Tuesday 25 February 2014

Useful addons for FireFox

FireBug

FireBug allows you to inspect, edit and monitor HTML, CSS and JavaScript in real-time.

http://getfirebug.com/

TabMixPlus

TabMixPlus has an option to display tabs in multiple rows when they don't fit in available width.

It includes features such as duplicating tabs, controlling tab focus, tab clicking options, undo closed tabs and windows, plus much more.

http://tmp.garyr.net/

FiddlerHook

Integrate Fiddler into FireFox

The FiddlerHook Firefox add-on points Firefox at Fiddler, avoiding the need for manual configuration or restarting Firefox.

https://www.fiddler2.com/redir/?id=FIDDLERHOOKHELP

http://docs.telerik.com/fiddler/KnowledgeBase/FiddlerHook

YSlow

YSlow analyses webpages and suggest ways to improve their performance.

Provides tools for performance analysis, including Smush.it™ and JSLint.

http://developer.yahoo.com/yslow/

PageSpeed

Similar to YSlow PageSpeed is a performance diagnostics tool.

Requires FireBug

https://developers.google.com/speed/pagespeed?csw=1

Friday 21 February 2014

Useful add-ons for Google Chrome

AdBlock

AdBlock for Chrome! Block all advertisements on all web pages, even Facebook and Youtube.

Google Store link

Awesome Screenshot

Capture the whole page or any portion, annotate screenshot, blur sensitive info, one-click upload to share.

Google Store link

UA spoofer / User-Agent Switcher

Spoofs & Mimics User-Agent strings

Handy if your are developing a site that needs to work on both mobile browsers and desktop browsers.

Google Store link

CSSScan

Offers a quick overview of CSS properties to the element the mouse cursor is hovering.

Google Store link

measureit

Draw out a ruler to get the pixel width and height of any elements on a webpage

Google Store link

Resolution Test

An extension for developers to test web pages in different screen resolutions, with an option to define your own resolutions.

Google Store link

Responsive Site View

View responsive websites at the dimensions of real device screens, capture screenshots for your portfolio.

Google Store link

Thursday 20 February 2014

How to abort a command in Command Prompt?

Use Ctrl + C

Click here to read more Command Prompt Tricks

Tuesday 18 February 2014

Useful jQuery plugins

Colorbox

A lightweight customizable lightbox plugin for jQuery.

Supports photos, grouping, slideshow, ajax, inline, and iframed content.

http://www.jacklmoore.com/colorbox/

Colorbox FAQs

jqTransform

This plugin allows you to skin form elements.

http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/

News Ticker

Taking inspiration from the BBC News website ticker, jQuery News Ticker brings a lightweight and easy to use news ticker to jQuery.

http://www.jquerynewsticker.com/

Unslider

The jQuery slider that just slides.

Use any HTML in your slides, extend with CSS. You have full control.

Supports dot navigation.

http://unslider.com/

ListNav

Add a letter-based navigation widget to any UL or OL list.

An easily stylable (via CSS) nav bar appears above the list, showing the user the letters A-through-Z.

Clicking one of the letters filters the list to show only the items in the list that start with that letter.

Batch files to stop and start IIS

Copy below commands to notepad and save as "IISStop.bat"

iisreset /stop
pause

Copy below commands to notepad and save as "IISStart.bat"

iisreset /start
pause

Double click on the file to run it. But you may get below error.

"Access denied, you must be an administrator of the remote computer to use this command. Either have your account added to the administrator local group of the remote computer or to the domain administrator global group."

In this case right click on the file and choose "Run as administrator".

What does iisreset do?

When you use iisreset command, the IIS Admin Service, the Windows Process Activation Service (WAS), and the World Wide Web Publishing Service (WWW Service) are stopped and restarted.

  • IISReset stops and restarts the entire web server.
  • Recycling an app pool will only affect applications running in that app pool.
  • Editing the web.config in a web application only affects that web application.
  • Editing the machine.config on the machine will recycle all app pools running.
  • IIS monitors the /bin directory of your application. Whenever a change is detected in those dlls, it will recycle the app and re-load those new dlls. It also monitors the web.config & machine.config in the same way and performs the same action for the applicable apps.

Where is the IIS Admin Service in IIS 7?

IIS Admin Service in not required in IIS 7 for as long as you are not using IIS Metabase compatibility feature or FTP 6 publishing services.

The interesting fact is that IIS can run without IIS admin service, Click here for the details.

Useful links

What does iisreset do?

Where is the IIS Admin Service

What does iisreset do?

How to stop batch files from closing automatically?

Usually a batch file auto-closes after processing the commands. But if you want to stop this behaviour then add a "pause" command at the end of the file.

pause DOS command

This prints "Press any key to continue . . . " message and waits for a key stroke.

Click on below links for more info

Batch files

Change output of pause command

List of DOS commands

RenderSection method in MVC3

You define the section in a view and render it in _Layout.cshtml. Section can contain any code that you normally put in a view, i.e. HTML, CSS or JavaScript or a combination of them.

RenderSection can only exist in Layout files i.e. master pages. If you want make a section that is reusable on many pages then you should go for a partial view.

Defining a section
@section Footer{
<p>This message is for Footer.</p>
}
Referencing a section
@RenderSection("Footer",false)
The second parameter is a boolean and specifies whether it is a required section or not.

Try below urls for more information

Layouts and sections with razor

RenderBody, RenderPage and RenderSection methods in MVC