Skip to content

Instantly share code, notes, and snippets.

View harshbaid's full-sized avatar

Harsh Baid harshbaid

View GitHub Profile
@rpattabi
rpattabi / howto_git-tfs.md
Created September 24, 2012 15:39
Using git to work with TFS

Introduction

There is an excellent adapter for git <--> tfs interaction. It is called git-tfs. Using this I could use my favorite git efficiently. Once I am done with my work I could push to tfs. This gist explains the steps I followed and brief git tfs command reference.

Installation

Run the below as Admin

Git DMZ Flow

I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.

  • Two developers working on independent features must never be blocked by each other
    • No code freeze! Ever! For any reason!
  • A developer must be able to base derivative work on another developer's work, without waiting for any third party
  • Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
  • Developers must be able to work on multiple features simultaneously, or at lea
@jammykam
jammykam / SelectRendering.xml
Created October 5, 2015 13:14
Updated Sitecore Tabbed Select Rendering Dialog
<?xml version="1.0" encoding="utf-8" ?>
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense">
<Sitecore.Shell.Applications.Dialogs.SelectRendering>
<FormDialog ID="Dialog" Icon="Core/32x32/open_document.png" Header="Open Item"
Text="Select the item that you wish to open. Then click the Open button." OKButton="Open">
<Stylesheet Src="SelectItemWithThumbnails.css" DeviceDependant="true" />
<CodeBeside Type="MyProject.Custom.Dialogs.SelectRenderingTabbed.SelectRenderingForm, MyProject.Custom"/>
<DataContext ID="DataContext" Root="/"/>
@kamsar
kamsar / SwitchMasterToWeb.config
Created October 29, 2015 19:56
Sitecore 8.1 SwitchMasterToWeb Patches
<?xml version="1.0" encoding="utf-8" ?>
<!--
Purpose: This include file simplifies the setup of Sitecore CD instances by removing any references to the Master database from Sitecore configuration files.
This include file should be used only on CD servers.
Important: Include files are applied in alphabetical order. The include files in root folder are applied before the include files in the subdirectories.
The subdirectories are applied in alphabetical order. Therefore this include file cannot remove any references to the Master database
that are defined in include files that are applied later. In this situation, you must rename this include file so that it is applied after
@AdamNaj
AdamNaj / Remove-OldItemVersion.ps1
Last active March 3, 2021 22:21
Item Version Pruner
function Remove-OldItemVersion {
[CmdletBinding()]
param(
[Parameter(Position = 0,Mandatory = $true,ValueFromPipeline = $true)]
[ValidateNotNullOrEmpty()]
[Sitecore.Data.Items.Item]$Item,
[Parameter(Position = 1,Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[int]$MaxVersions
)
@marcduiker
marcduiker / Update workflow and state on content items.ps1
Created May 5, 2016 23:58
Sitecore Powershell script to update the workflow and state on content items which do not have a workflow set on them.
<#
.SYNOPSIS
Updates the Workflow and Workflow state fields of content items with the given $workflowID and $workflowStateID values.
.DESCRIPTION
This script can be used when existing content is not assigned to a workflow and workflow state while it should be.
This scenario usually occurs when a workflow is assigned to a template but there is already content created based on a previous version of that template (where the workflow was not yet assigned).
@Adamsimsy
Adamsimsy / Sitecore Powershell change item template.ps1
Last active April 20, 2023 10:07
Sitecore Powershell examples
$item = Get-Item master:/content/home
$newTemplate = [Sitecore.Configuration.Factory]::GetDatabase("master").Templates["Sample/Sample Item"];
$item.ChangeTemplate($newTemplate)
@michaellwest
michaellwest / Config_Enable-Disable_Sitecore_8.1_upd3.csv
Last active June 20, 2024 12:45
The following script imports the specified Sitecore Role configuration csv and automatically enables or disables the configs.
Product Filepath Filename DefaultExtension Provider CD CM PRC CMP RPT
Platform \website\ Web.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ Commands.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ ConnectionStrings.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ ConnectionStringsOracle.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ FieldTypes.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ Icons.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ LanguageDefinitions.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ MimeTypes.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ Portraits.config config Enable Enable Enable Enable Enable
@thinkfreshnick
thinkfreshnick / InstallSitecoreInstallFramework.ps1
Last active May 23, 2019 05:52
Install latest version of the Sitecore Install Framework and remove any previously installed versions
Import-Module SitecoreInstallFramework
$Module = Get-Module SitecoreInstallFramework
Remove-Module $Module.Name
Remove-Item $Module.ModuleBase -Recurse -Force
Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
Set-PSRepository -Name SitecoreGallery -InstallationPolicy Trusted
Install-Module SitecoreInstallFramework
Get-Module -Name SitecoreInstallFramework -ListAvailable
@jermdavis
jermdavis / Install-Solr.ps1
Last active November 23, 2021 13:30
A PowerShell script to help installing Solr as a service - See https://blog.jermdavis.dev/posts/2017/low-effort-solr-installs for details
Param(
$solrVersion = "6.6.2",
$installFolder = "c:\solr",
$solrPort = "8983",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "1.8.0_151"
)