Skip to content

Instantly share code, notes, and snippets.

View robvanoostenrijk's full-sized avatar

Rob van Oostenrijk robvanoostenrijk

  • United Arab Emirates
View GitHub Profile
@robvanoostenrijk
robvanoostenrijk / single_line.sh
Created July 18, 2017 03:31
Java - Generate Self-Signed SSL Certificate
# Generate a self-signed certificate in a Java keystore as a single line command
# Note this generates a SAN certificate for machine.domain, localhost & 127.0.0.1
keytool -genkeypair \
-keyalg RSA \
-keysize 2048 \
-alias "machine.domain" \
-keystore /discovery-service/config/keystore.jks \
-keypass "key-password" \
-storepass "store-password" \
-validity 1095 \
@robvanoostenrijk
robvanoostenrijk / TcmSetUnpublished.sql
Last active June 21, 2017 04:02
Mark items as unpublished in Tridion through database
-- This query uses the default stored procedure to set the publish state for any published items to unpublished
-- Note: Do NOT run this on a production SDL Tridion instance, as this activity is not officially supported by SDL Tridion.
DECLARE @publicationTargetId INT
DECLARE @publicationId INT
DECLARE @referenceId INT
DECLARE @itemType INT
DECLARE @state INT
DECLARE @trusteeId INT
DECLARE @templateReferenceId INT
@robvanoostenrijk
robvanoostenrijk / web.config
Created June 11, 2014 11:12
Override Internet Explorer compatibility mode on Intranet
<system.webServer>
<httpProtocol>
<customHeaders>
<clear/>
<add name="X-UA-Compatible" value="IE=edge,chrome=1"/>
</customHeaders>
</httpProtocol>
</system.webServer>
@robvanoostenrijk
robvanoostenrijk / jvm.xml
Created July 22, 2015 09:06
Tridion: jvm.xml format
<VirtualMachine>
<Options>
<Option Name="-Xmx" Value="1024M" />
<Option Name="-Dfile.encoding" Value="UTF-8" />
<Option Name="-Djava.io.tmpdir" Value="D:\Temp" />
<Option Name="-Xms" Value="50M" />
</Options>
<Classpath>
<Include LibraryPath="D:\Apps\Tridion\lib" />
<Include LibraryPath="D:\Apps\ActiveMQ\lib" />
@robvanoostenrijk
robvanoostenrijk / TridionRestart.vbs
Created April 27, 2015 05:16
Tridion 2013 Restart Script
Sub StartService(Computer, ServiceName, Wait)
Dim cimv2, oService, Result
' Get the WMI administration object
Set cimv2 = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & Computer & "\root\cimv2")
' Get the service object
Set oService = cimv2.Get("Win32_Service.Name='" & ServiceName & "'")
' Check base properties
@robvanoostenrijk
robvanoostenrijk / MonochromeTIFF.cs
Created November 17, 2014 10:07
Save Bitmap as 1-bit CCITT4 compressed TIFF
public static void SaveMonochromeTIFF(Bitmap bitmap, String outputFile)
{
if (bitmap == null)
throw new ArgumentNullException("bitmap");
imageCodecInfo = ImageCodecInfo.GetImageEncoders().FirstOrDefault(ici => ici.MimeType == "image/tiff");
if (imageCodecInfo == null)
throw new NotSupportedException("No image codec for tiff found.")
@robvanoostenrijk
robvanoostenrijk / notes.md
Last active August 29, 2015 14:07
Tridion 2013 - XSLT Mediator

XSLT Mediator Usage

Transformation Configuration

Xslt mediator allows specifying special parameters which are used for the transformation process:

<?XsltMediator inputitemname="*package name*" outputitemname="*package name*" extensionsTbbId="*tcm:223-123123-2048*"?>

The output methods defined are: