Skip to content

Instantly share code, notes, and snippets.

[Route("/SendFile")]
public void SendFile(IManosContext ctx)
{
const string path = "/etc/services";
ctx.Response.Headers.SetNormalizedHeader("Content-Type", ManosMimeTypes.GetMimeType(path));
ctx.Response.SendFile(path);
ctx.Response.End();
}
# dmesg | grep -i edac
EDAC MC: Ver: 2.1.0 Mar 1 2011
EDAC amd64_edac: Ver: 3.3.0 Mar 1 2011
EDAC amd64: ECC is enabled by BIOS.
EDAC amd64: This node reports that Memory ECC is currently disabled, set F3x44[22] (0000:00:19.3).
EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
amd64_edac: probe of 0000:00:19.2 failed with error -22
EDAC MC: F10h CPU detected
EDAC MC: DCT0 chip selects:
EDAC MC: 0: 4096MB 1: 0MB
@ahall
ahall / gist:659011
Created November 1, 2010 22:43
TransformXslt.cs
public static void Transform(Stream xmlDoc, string sXslPath, Stream outStream)
{
//load the Xml doc
XPathDocument myXPathDoc = new XPathDocument(xmlDoc);
XslTransform myXslTrans = new XslTransform();
//load the Xsl
myXslTrans.Load(sXslPath) ;