Skip to content

Instantly share code, notes, and snippets.

View vtml's full-sized avatar

Vincent Lui vtml

View GitHub Profile
@bic742
bic742 / Get-PathsFromTds.ps1
Created August 9, 2023 13:45
This is a PowerShell script that will parse TDS scproj files and generate corresponding SCS module.json files. This process includes consolidation of paths to prevent overly prescriptive configurations. It also supports providing path exclusions to ignore things that should no longer be tracked in a newer tool.
Param(
[string]$srcPath
)
function Invoke-DedupeOutput {
Param(
[System.Collections.ArrayList]$includes
)
$dedupedIncludes = [System.Collections.ArrayList]@()
@cassidydotdk
cassidydotdk / Build.ps1
Last active May 23, 2021 06:01
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()]
@bic742
bic742 / SearchQuery.cs
Last active August 15, 2023 12:04
Extended Sitecore SearchQuery to support sorting and more complex search criteria
using GraphQL.Types;
using Sitecore.ContentSearch;
using Sitecore.ContentSearch.Linq;
using Sitecore.ContentSearch.Linq.Utilities;
using Sitecore.ContentSearch.Utilities;
using Sitecore.Data;
using Sitecore.Data.Managers;
using Sitecore.Globalization;
using Sitecore.Services.GraphQL.Content.GraphTypes.ContentSearch;
using Sitecore.Services.GraphQL.GraphTypes.Connections;

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@daredude
daredude / docker-clear.bat
Created June 5, 2016 10:53
delete all docker container and images on windows
@echo off
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i
@kamsar
kamsar / Install Solr.ps1
Last active February 26, 2019 14:30
Sitecore Solr Cannon
# This script will set up (and install if needed) Apache Solr for a Sitecore instance.
# This does NOT configure Sitecore to use Solr,
# just the Solr server and cores for Sitecore to connect to once it is set up to use Solr.
# So, what does it do?
#
# * Installs SOLR, if needed, from the Bitnami SOLR stack: https://bitnami.com/stack/solr/installer
# * Creates a SOLR config set for the cores to share (shared schema)
# * Creates SOLR cores for all Sitecore indexes, including secondary cores to support online reindexing (Switch on Rebuild)
@patik
patik / git-setup.sh
Created November 13, 2015 13:24
Git and Node with Zscaler proxy
#!/bin/sh
# Git proxy settings
echo "Configuring Git..."
git config --global http.proxy http://gateway.zscaler.net:80/
git config --system http.proxy http://gateway.zscaler.net:80/
git config --global http.sslVerify false
git config --system http.sslVerify false
git config --global --unset http.sslcainfo
git config --system --unset http.sslcainfo