Emmanuel Nelson manuelnelson

View Pechkin.cs
1 2 3 4 5 6 7 8 9 10
public ActionResult PrintForm(string html)
{
var globalConfig = new GlobalConfig();
globalConfig.SetPaperSize(PaperKind.Letter);
var margins = new Margins(100, 100, 100, 100);
globalConfig.SetMargins(margins);
var synchronizedPechkin = new SynchronizedPechkin(globalConfig);
 
var config = new ObjectConfig();
config.SetAllowLocalContent(true)
View Pechkin
1 2 3 4 5 6 7 8 9 10
public ActionResult PrintForm(string html)
{
var globalConfig = new GlobalConfig();
globalConfig.SetPaperSize(PaperKind.Letter);
var margins = new Margins(100, 100, 100, 100);
globalConfig.SetMargins(margins);
var synchronizedPechkin = new SynchronizedPechkin(globalConfig);
 
var config = new ObjectConfig();
config.SetAllowLocalContent(true)
View PDF.cs
1 2 3 4 5 6 7 8 9 10
public JsonResult PrintForm(string html)
{
try
{
var contentPath = Server.MapPath("~/Content/");
var css = System.IO.File.ReadAllText(Path.Combine(contentPath + "bootstrap.css"));
var fullHtml = string.Format(@"<!DOCTYPE html> <html> <head><style type='text/css'> {0} </style></head><body> {1} </body></html>",css, html);
var config = new ObjectConfig();
config.SetAllowLocalContent(true);
View gist:2945258
1 2 3 4 5 6 7 8 9
$('#saveSample').click(function () {
$('#loading').show();
try {
var buffer = getFinalSampleBuffer();
}
catch (ex) {
Mashup.ShowMessage(ex);
return false;
}
View gist:2821543
1 2 3 4 5 6 7 8 9 10
/// <summary>
/// Sets the Cross Origin Response Object for a given bucket
/// </summary>
/// <param name="bucket"></param>
private void SetCors(IBucket bucket)
{
ICors cors = new Cors();
cors.AddOrigin("http://yourdomainhere.com");
cors.AddMethod("GET");
cors.MaxAge = 1800;
View AzureCacheClient.cs
1 2 3 4 5 6 7 8 9 10
using System;
using System.Collections.Generic;
using Elmah;
using Microsoft.ApplicationServer.Caching;
using ServiceStack.CacheAccess;
 
namespace BusinessLogic
{
public class AzureCacheClient : ICacheClient
{
View MiniProfilerHandler.cs
1 2 3 4 5 6 7 8 9
if (profiler != null)
{
// HACK: unviewed ids are added to this list during Storage.Save, but we know we haven't see the current one yet,
// so go ahead and add it to the end - it's usually the only id, but if there was a redirect somewhere, it'll be there, too
Profiler.Settings.EnsureStorageStrategy();
var ids = Profiler.Settings.Storage.GetUnviewedIds(profiler.User);
ids.Add(profiler.Id);
 
path = @"/" + (path ?? "") + EndpointHost.Config.ServiceStackHandlerFactoryPath;
Something went wrong with that request. Please try again.