Skip to content

Instantly share code, notes, and snippets.

//Rextester.Program.Main is the entry point for your code. Don't change it.
//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Rextester
{
get-package -listavailable -filter visitorgroupscriteria -allversions | select id, version, dependencies
@neilgibbons
neilgibbons / percentages
Created April 16, 2015 14:00
Get index percentages
SELECT
t.NAME 'Table name',
i.NAME 'Index name',
ips.index_type_desc,
ips.alloc_unit_type_desc,
ips.index_depth,
ips.index_level,
ips.avg_fragmentation_in_percent,
ips.fragment_count,
ips.avg_fragment_size_in_pages,
@neilgibbons
neilgibbons / reindex
Created April 16, 2015 13:40
Reindex
USE DatabaseName --Enter the name of the database you want to reindex
DECLARE @TableName varchar(255)
DECLARE TableCursor CURSOR FOR
Set-ExecutionPolicy Unrestricted
$DebugPreference = "Continue"
$Desktop = "C:\Users\Administrator\Desktop\Filewatch"
$Web = "C:\Websites\ACS\Web"
$Application = "D:\Live\Redirects"
$Log = "C:\Users\Administrator\Desktop\Filewatch"
# Functions
. "$Desktop\New-SymLink.ps1"
This file has been truncated, but you can view the full file.
pool-1-thread-2 2015-03-06 16:25:27,933 INFO SearchIndexProcessor - Configuration is: Storage(Class=com.tridion.storage.si4t.JPASearchDAOFactory, Id=si4tdb, Type=persistence, dialect=MSSQL)[Pool(CheckoutTimeout=120, IdleTimeout=120, MonitorInterval=60, Size=5, Type=jdbc), DataSource(Class=com.microsoft.sqlserver.jdbc.SQLServerDataSource)[Property(Name=serverName, Value=54.208.170.114), Property(Name=portNumber, Value=1433), Property(Name=databaseName, Value=Tridion_Broker), Property(Name=user, Value=sa), Property(Name=password, Value=quzaPr6!)]SI4T: configure the indexer class,
as well as which binaries to index, the default URL to post documents to as well as
@neilgibbons
neilgibbons / gist:891664e8a86146a36c96
Created July 16, 2014 07:53
Run jMeter from the command line
// Example taken from http://jmeter.apache.org/usermanual/get-started.html
jmeter -n -t my_test.jmx -l log.jtl -H my.proxy.server -P 8000
jmeter -n -t "E:\Work\Coats\Crafts\Perf tests\Coats Industrial.jmx" -l log.jtl -JTHREAD=1 -JSECONDS=1 -JLOOP=1 -JDELAY=1 -JSITE=/en-gb
@neilgibbons
neilgibbons / CURL Fredhopper
Created April 29, 2014 08:48
How to query Fredhopper from CURL
curl -d @gb.xml -H "SOAPAction: ''" -H "Content-type=text/xml;chatset=utf-8" http://xxxx:8180/fredhopper-ws/services/FASWebService -o response.xml -s -w %{time_total}
<?xml version="1.0" encoding="utf-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<fh_params xmlns="http://ns.fredhopper.com/XML/output/6.1.0">fh_location=//catalog01/en_US/71_promote_on_homepage>{71_promote_on_homepage__dir__yes}&amp;fh_view_size=50&amp;fh_nothemes</fh_params>
</S:Body>
</S:Envelope>
@neilgibbons
neilgibbons / gist:9664143
Created March 20, 2014 13:50
Get categories from Tridion db
SELECT o.Title, o.DESCRIPTION
FROM [Tridion_cm].[dbo].[ORG_ITEM_PUBLICATIONS] o
inner join [Tridion_cm].[dbo].[ORGANIZATIONAL_ITEMS] oi on oi.ID = o.ORGANIZATIONAL_ITEM_ID
where PUBLICATION_ID = 67 and oi.ITEM_TYPE = 512 order by o.TITLE
@neilgibbons
neilgibbons / TCCCP
Created November 21, 2013 14:19
Content Porter Xml for component
<tcccp:Item xmlns:tcccp="http://www.tridion.com/ContentManager/5.2/ImportExport">
<tcccp:BlueprintParentUrl></tcccp:BlueprintParentUrl>
<tcccp:PrimaryBlueprintParentUrl></tcccp:PrimaryBlueprintParentUrl>
<tcccp:BinaryFileLocation></tcccp:BinaryFileLocation>
<tcm:Data xmlns:tcm="http://www.tridion.com/ContentManager/5.0">
<tcm:Title>Back to School - UK - Blog 32 A</tcm:Title>
<tcm:Type>Normal</tcm:Type>
<tcm:Schema xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:title="Crafts.Blog" xlink:href="/webdav/30_Global%20Content%20%5BINT%5D/Building%20Blocks/System/Schemas/Crafts/Content/Crafts%2EBlog.xsd" IsMandatory="false" />
<tcm:Content>
<Coats.Crafts.Schemas.Blog xmlns="http://www.makeitcoats.com/sdltridion/schemas/blog">