Skip to content

Instantly share code, notes, and snippets.

View abhaydhar's full-sized avatar

ABHAY DHAR abhaydhar

  • bengaluru
View GitHub Profile
postman-collection-transformer convert -i
D:\postman\Sitecore.Commerce.Engine.SDK.2.1.10\postman\Shops\Authentication.postman_collection.json
-o D:\postman\Sitecore.Commerce.Engine.SDK.2.1.10\postman\Shops\New.Authentication.postman_collection.json -j 1.0.0 -p 2.0.0 -P
@abhaydhar
abhaydhar / Delete document from Index or Collection
Last active June 9, 2022 06:09
Delete document from Index or Collection
https://localhost:8986/solr/sitecore_master_index/update?stream.body=<delete><query>id:ee06293f941b42cdb4d316e2c09d762e</query></delete>&commit=true
@abhaydhar
abhaydhar / Build.ps1
Created May 23, 2021 06:01 — forked from cassidydotdk/Build.ps1
Complete Build and Publish Script. Will deploy all projects to publishing target, no HPP required.
param(
[Parameter()]
[switch]$NoBuild,
[Parameter()]
[switch]$NoSync,
[Parameter()]
[string]$CmHost="https://habitatstarterkit.local",
[Parameter()]
[string]$SolutionName="HabitatStarterKit.sln",
[Parameter()]
Upload Collection -
zkcli.bat -zkhost <YOUR_ZOOKEEPER_URL>.searchstax.com:2181 -cmd upconfig -confdir ../configsets/customindexname_web_index/conf/ -confname customindex_site_search_configs
CREATE -
curl -u 'Username:Password' 'https://<YOUR_SOLR_SEARCHSTAX_URL>/solr/admin/collections?action=CREATE&name=custom_site_master_index&collection.configName=customindex_site_search_configs&numShards=1&replicationFactor=1'
curl -u 'Username:Password' -k 'https://<YOUR_SOLR_SEARCHSTAX_URL>/solr/admin/collections?action=CREATE&name=custom_site_web_index&collection.configName=customindex_site_search_configs&numShards=1&replicationFactor=1&createNodeSet=http://<YOUR_SOLR_URL>:8983/solr'
DELETE -
curl -u 'Username:Password' -k 'https://<YOUR_SOLR_SEARCHSTAX_URL>/solr/admin/collections?action=DELETE&name=custom_site_web_index&wt=xml'
$("#myform").bind('ajax:complete', function() {
//Do Something
});
@abhaydhar
abhaydhar / DeployKudu
Created October 7, 2019 12:22
Powershell Script to deploy Dotnet and Unicorn Files to Azure App Service using Kudu Rest API
# User name from WebDeploy Publish Profile.
$userName = "`$" #Use backtick while assigning variable content
# Password from WebDeploy Publish Profile
$password = "password"
# Encode username and password to base64 string
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $userName, $password)))
$envName = "https://.scm.azurewebsites.net" #Replace from publish settings
@abhaydhar
abhaydhar / FileRenameExtensionMethod
Created March 5, 2018 10:19
Extension Method to Rename a file in a directory
public static class ExtensionMethod
{
public static void Rename(this FileInfo fileInfo, string newName)
{
fileInfo.MoveTo(fileInfo.Directory.FullName + "\\" + newName + fileInfo.Extension);
}
}
//Caller
FileInfo file = new FileInfo("Complete_Directory_path_of_file");
file.Rename(fName.Replace('/', '-'));