Skip to content

Instantly share code, notes, and snippets.

View allude's full-sized avatar
Insufficient coffee

Alex allude

Insufficient coffee
View GitHub Profile
@allude
allude / XmlSerializerCache.cs
Created March 24, 2018 05:18
XmlSerializer Cache Class
// Based on https://codereview.stackexchange.com/questions/24861/caching-xmlserializer-in-appdomain
public static class XmlSerializerCache
{
private AppDomain cache {
get {
return AppDomain.CurrentDomain;
}
}
public static XmlSerializer GetXmlSerializer(Type type, XmlRootAttribute xmlRoot)
{
@allude
allude / Sf.php
Last active June 29, 2016 16:35
Catch Salesforce outbound message and write to file.
<?php
/* joshQ
* Crude SOAP Responder for SFDC Outbound Messages</u></span>
* THIS SOFTWARE IS PROVIDED AS IS.*/
// Get raw post data
$data = fopen('php://input', 'rb');
$content = fread($data,5000);
// Write message to file