Posts

Showing posts from November, 2010

PowerShell | Activate & Deactivate the Developer DashBoard

This command sets the developer dashboard state in SharePoint 2010. When active, it displays a set of information in the bottom of the masterpage of every website. PS C:\Users\tiago> stsadm -o setproperty -propertyname developer-dashboard -prop ertyvalue [On|Off]

SharePoint | Get currently active master page [2010/2007]

** SHAREPOINT 2010 / POWERSHELL *** GET: get-spweb -id http://sharepointbind/new/basicsearch | select CustomMasterUrl SET: (get-spweb -id http://sharepointbind/new/basicsearch).MasterUrl = "_catalogs/masterpage/v4.master" *** WSS3/MOSS 2007 / STSADM *** Get my version of msdn's package, repackaged for fixed "type null" issue and with SharePoint solution installer attached for faster installation. Just install and then run "stsadm -o showmaster page -url http://localhost" Download here MSDN CustomPageCommands Link *** Enable/Disable SP2010 Features *** Enable-SPFeature -Identity featurename –url http://yoursiteurl Disable-SPFeature -Identity featurename –url http://yoursiteurl

HP Laptop BSOD when installing XP

When trying to install Windows XP on Sata HD (HP Laptop), you might run into this blue screen: ***STOP: 0x0000007B (0xF78D2524,0xC0000034,0x00000000,0x00000000). To fix it, start the laptop, press "ESC", F10 (BIOS), go to device configurations and move option "AHCI" to "IDE"

C# | Write HTML from external file

I just wrote this for a friend. It lets us load html dynamically into our page, that is located in some external file. Commented lines are for debugging purposes //Response.Write(Path.GetFullPath(Server.MapPath("1\\teste.txt"))); string filePath = Path.GetFullPath(Server.MapPath("1\\teste.txt")); string fileContents = File.ReadAllText(filePath); //Response.Write(fileContents); this.Controls.Add(new LiteralControl(fileContents)); http://www.csharp411.com/c-read-text-file-into-string/

CCNA Cheat Sheet

My own precious learning sheet for all those CCNA alumni and anyone else who wants to take a helicopter view at CCNA CCNA_Cheat_Sheet.pdf Check PacketLife.net for some stunning cheat sheets

PowerShell | Filter svn files while zipping

Use the -xr!?svn\* switch to filter svn files out of zip packages "C:\Program Files\7-Zip\7z.exe" a -r -tzip -y -xr!?svn\* Project.zip C:\Project\To\Backup\* or (worked for me) "C:\Program Files\7-Zip\7z.exe" a -r -tzip -y -xr!?svn Project.zip C:\Project\To\Backup\* http://superuser.com/questions/28162/how-do-i-use-7-zip-to-backup-files-but-exclude-some-directories

Track Registry Changes with RegShot

You can make a "registry shot" before and after installing an application and see what keys exactly were added and/or changed ;-) http://www.majorgeeks.com/download965.html