Skip to content

Instantly share code, notes, and snippets.

View vikaskumar185's full-sized avatar

Vikas Kumar vikaskumar185

View GitHub Profile
@vikaskumar185
vikaskumar185 / QuickSort.py
Last active June 3, 2018 07:33
QuickSort
#Author: VikasKumar<vikaskumar185@gmail.com>
#Time Complexity:
#Best Case : O(nlogn)
#Worst Case : O(n^2)
#Suggestion : Always use middle element as Pivot
#QuickSort
def QuickSort(arr,low,high):
if low<high:
j = Partition(arr,low,high)
@vikaskumar185
vikaskumar185 / BruteForce.py
Last active June 2, 2018 11:13
#Bruteforce Patter Matching Multiple Occurence
#Bruteforce Pattern Matching - Multiple Occurence
#Author: VikasKumar<vikaskumar185@gmail.com>
#string: abcdababcgvabcabcddabcdaadabdwgdabdfg
#pattern: abcd
string = "70123456789basdhosdln,asbhiwueoywqieyowqoeho697wqdhosdln,97e9wuedhosdln,dhosdln,dhosdln,dhosdln,"
pattern = "dhosdln,"
@vikaskumar185
vikaskumar185 / DeleteTargetTypes.ps1
Last active July 26, 2017 14:03
This scripts helps deleting TargetTypes in SDL Web 8+ which has components already published. This script needs Powershell Core service module to run. Ex: in powershell, Run - .\DeleteTargetTypes.ps1 -TargetTypeTcmId 'tcm:0-17-65538'
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[string]$TargetTypeTcmId = 'tcm:0-17-65538', #Choose your own TargetType Id
[switch]$DryRun = $false
)
Begin{
try{
@vikaskumar185
vikaskumar185 / DeleteTargetTypes.ps1
Created July 26, 2017 14:00
This scripts helps deleting TargetTypes in SDL Web 8+ which has components already published. This script needs Powershell Core service module to run.
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[string]$TargetTypeTcmId = 'tcm:0-17-65538', #BusinessProcessType
[switch]$DryRun = $false
)
Begin{
try{
@vikaskumar185
vikaskumar185 / deployer-conf.xml
Last active July 22, 2017 19:20
Web 8.5 deployer-conf.xml
<?xml version="1.0" encoding="UTF-8"?>
<Deployer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="8.5"
xsi:noNamespaceSchemaLocation="schemas/deployer-conf.xsd">
<Pipelines>
<Pipeline Id="Tridion-Bootstrap" Action="TridionBootstrap" Verb="Content,Prepare,Commit">
<Steps>
<Step Id="TridionUnzipStep"/>
</Steps>
</Pipeline>
<Pipeline Id="Tridion-Wait" Action="Deploy,Undeploy" Verb="Wait">