Skip to content

Instantly share code, notes, and snippets.

View sebastiantecsi's full-sized avatar

Sebastian Tecsi sebastiantecsi

View GitHub Profile
@vtml
vtml / enhanced-ce-import.ps1
Last active March 10, 2021 11:18
Sitecore Creative Exchange Import SPE script
<#
.SYNOPSIS
Performs a Sitecore Creative Exchange Import from the files on disk
.DESCRIPTION
This script utilises the Sitecore Creative Exchange to import front end static assets into the media library. This gives the front end development team full flexibility to use the tools
they are needed to produce the final output. This is a Sitecore Powershell Extension script that should be stored where all the other Script Libraries are placed in Sitecore.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore>
<databases>
<database id="core">
<dataProviders hint="list:AddDataProvider">
<dataProvider ref="dataProviders/main" param1="$(id)">
<prefetch hint="raw:AddPrefetch">
<patch:delete />
</prefetch>
</dataProvider>
@mikaelnet
mikaelnet / Sitecore-InvalidContentFieldData.sql
Last active November 2, 2022 00:47
Finds invalid content in the Sitecore database
DECLARE @SharedFieldId UniqueIdentifier = '{BE351A73-FCB0-4213-93FA-C302D8AB4F51}' /* Shared checkbox */
DECLARE @UnversionedFieldId UniqueIdentifier = '{39847666-389D-409B-95BD-F2016F11EED5}' /* unversioned checkbox */
DECLARE @TemplateFieldId UniqueIdentifier = '{455A3E98-A627-4B40-8035-E683A0331AC7}' /* Template field */
-- Find all templates WHERE both "Unversioned" AND "Shared" is selected:
-- "Shared" will have precedense, so the "Unversioned" checkbox can be removed
SELECT * FROM SharedFields
WHERE FieldId=@UnversionedFieldId AND [Value] = '1'
AND ItemId IN (SELECT ItemId FROM SharedFields WHERE FieldId=@SharedFieldId AND [Value]='1')
@fstueber
fstueber / EnableTLSv12ForWebDeploy.reg
Last active June 5, 2021 08:56
Enabling TLS 1.2 for IIS Manager and Web Deploy after disabling SSL3, TLS 1.0 and TLS 1.1
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001
@michaellwest
michaellwest / CleanupBlobData.sql
Created September 24, 2019 16:03
Cleanup orphaned blob data using SSMS. When Sitecore runs this process it may timeout otherwise.
DECLARE @BlobID uniqueidentifier;
SELECT @BlobID = '{FF8A2D01-8A77-4F1B-A966-65806993CD31}';
WITH [BlobFields] ([fieldid])
AS (SELECT [sharedfields].[itemid]
FROM [sharedfields]
WHERE [sharedfields].[fieldid] = @BlobID
AND [sharedfields].[value] = 1
UNION
SELECT [versionedfields].[itemid]
# Inspired by https://gist.github.com/jbratu/6262684939e15e638892973f5f8eed78 and https://stackoverflow.com/questions/55914397/enable-tls-and-disable-ssl-via-powershell-script
function Disable-SSL-2.0 {
New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server' -name Enabled -value 0 -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server' -name 'DisabledByDefault' -value 1 -PropertyType 'DWord' -Force | Out-Null
New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client' -name Enabled -value 0 -PropertyType 'DWord' -Force | Out-Null
New-Ite
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Michal Talaga",
"label": "Chief Technology Officer",
"image": "",
"email": "[email protected]",
"phone": "+48600877544",
"summary": "With over 20 years in the software industry, I've combined technical expertise with leadership, working across agile startups and established enterprises. My experience encompasses growing SaaS products and managing teams at respected companies. This blend of technical knowledge and leadership fosters a balanced approach to technology and management, translating into measurable achievements and growth.",
"location": {
@jraps20
jraps20 / build.yml
Created August 12, 2019 17:57
Cache NuGet Packages with Cache Task in Azure DevOps YAML
- powershell: | # generates a hash of all packages.config and saves each on a single line on 'hash.txt'
Get-FileHash -Algorithm MD5 -Path (Get-ChildItem packages.config -Recurse) >> hash.txt
Write-Host "Hash File saved to $pwd\hash.txt"
workingDirectory: src
displayName: 'Calculate and save packages.config hash'
- task: CacheBeta@0 # speed up builds by caching packages folder
inputs:
key: nuget|1|$(Agent.OS)|$(Build.SourcesDirectory)\src\hash.txt # hash map generated in previous step
path: $(Build.SourcesDirectory)\src\packages
using System;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
private static ManualResetEventSlim _mutex = new ManualResetEventSlim();
private static Task _sharedTask;
@jeanfrancoislarente
jeanfrancoislarente / copy-repo.ps1
Last active June 15, 2019 04:12
Copy contents of a git repo (branch) to another similar (not connected) repo
<#
.SYNOPSIS
Simple but useful script to copy "exported" git content from one repo (specific branch) to another repo
.DESCRIPTION
Script allows copying from two different repos (different providers, between public and private repos, etc) by creating an
archive (git archive) of a particular branch in one repo and extracting it into a cleaned destination folder
which is linked to another related but disconnected repo.
This is particularly useful when you can't fork a public repo and make it private
(when dealing perhaps with repos that leverage both public and pre-release / unpublished software)