Skip to content

Instantly share code, notes, and snippets.

View isaadansari's full-sized avatar
💭
For getting something you never had, you have to do something you never did!

Saad Ansari isaadansari

💭
For getting something you never had, you have to do something you never did!
View GitHub Profile
@model Sitecore.XA.Foundation.RenderingVariants.Models.VariantListsRenderingModel
@using Sitecore.Data.Items
@using Sitecore.XA.Foundation.MarkupDecorator.Extensions
@using Sitecore.XA.Foundation.RenderingVariants.Extensions
@using Sitecore.XA.Foundation.RenderingVariants.Fields
@using Sitecore.XA.Foundation.SitecoreExtensions.Extensions
@using Sitecore.XA.Foundation.Variants.Abstractions.Fields
@{
int index = 0;
}
// sitecore forms
var input = document.querySelector(".gm-phone-no-field");
window.intlTelInput(input, {
autoHideDialCode: false,
autoPlaceholder: "off",
dropdownContainer: document.body,
formatOnDisplay: false,
nationalMode: false,
separateDialCode: true,
@isaadansari
isaadansari / Install-Solr-6.6.2.ps1
Last active October 26, 2019 10:46 — forked from jermdavis/Install-Solr.ps1
A PowerShell script to help installing Solr as a service - See https://jermdavis.wordpress.com/2017/10/30/low-effort-solr-installs/ for details
Param(
$solrVersion = "6.6.2",
$installFolder = "c:\solr",
$solrPort = "8983",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "9.0.1"
)
.checkboxes {
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
input {
position: absolute;
opacity: 0;
Param(
$installFolder = "c:\solr",
$solrPort = "8750",
$solrHost = "localhost",
$solrSSL = $true,
$downloadFolder = "$PSScriptRoot"
)
$solrVersion = "7.5.0"
$solrName = "solr-$solrVersion"
Param(
$installFolder = "c:\solr",
$solrPort = "8721",
$solrHost = "solr",
$solrSSL = $true,
$downloadFolder = "$PSScriptRoot"
)
$solrVersion = "7.2.1"
$solrName = "solr-$solrVersion"
@isaadansari
isaadansari / extensions.md
Created June 20, 2019 13:48 — forked from chrisvfritz/extensions.md
VSCode Config
  • Annotator: Display the annotation view (git blame) of the current file.
  • beutify: Beautify javascript, JSON, CSS, Sass, and HTML in Visual Studio Code.
  • Can I Use: Compatibility check for HTML5, CSS3, SVG, New JS API based on http://caniuse.com/ directly from Visual Studio Code.
  • Code SpellChecker: A basic spell checker that works well with camelCase code.
  • Custom CSS and JS: Custom CSS to your VS Code.
  • Debugger for Chrome: A VS Code extension to debug your JavaScript code in the Google Chrome browser, or other targets that support the Chrome Debugging Protocol.
  • EditorConfig for VSCode: EditorConfig support for Visual Studio Code.
  • ESLint: Integrates ESLint into VS Code.
  • File Utils: A convenient way of creating, duplicating, moving, renaming, deleting files and directories.
  • Flow Language Support: This extension adds Flow support for VS Code. Flow is a static type checker, designed to find type errors in JavaScript programs.
@isaadansari
isaadansari / DescendantsTreeRenderingContentsResolver.cs
Created June 20, 2019 12:43 — forked from vitaliitylyk/DescendantsTreeRenderingContentsResolver.cs
A custom Sitecore JSS rendering contents resolver, which serializes items into a tree-like JSON structure. More information at https://blog.vitaliitylyk.com/jss-and-arbitrary-item-hierarchies/
using Newtonsoft.Json.Linq;
using Sitecore.Data.Items;
using Sitecore.LayoutService.Configuration;
namespace VitaliiTylyk.JavascriptServices.RenderingContentsResolvers
{
/// <summary>
/// Builds a tree-like structure of datasource item's descendants
/// </summary>
public class DescendantsTreeRenderingContentsResolver : Sitecore.LayoutService.ItemRendering.ContentsResolvers.RenderingContentsResolver
@isaadansari
isaadansari / XP0-SingleDeveloper.ps1
Last active December 3, 2018 10:06
XP0-SingleDeveloper.ps1
# The Prefix that will be used on SOLR, Website and Database instances.
$Prefix = "xp91"
# The Password for the Sitecore Admin User. This will be regenerated if left on the default.
$SitecoreAdminPassword = "SIF-Default"
# The root folder with the license file and WDP files.
$SCInstallRoot = "C:\ResourceFiles"
# The name for the XConnect service.
$XConnectSiteName = "$prefix.xconnect"
# The Sitecore site instance name.
$SitecoreSiteName = "$prefix.sc"
@isaadansari
isaadansari / Install-Solr-7-2-1.ps1
Last active December 3, 2018 10:05
Install-Solr-7-2-1.ps1
Param(
$solrVersion = "7.2.1",
$installFolder = "c:\solr\",
$solrPort = "8983",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "9.0.1"
)