Skip to content

Instantly share code, notes, and snippets.

View elebetsamer's full-sized avatar

Eric Lebetsamer elebetsamer

  • Electronic Arts
  • Bay Area, CA
View GitHub Profile
@elebetsamer
elebetsamer / st-generate.js
Last active July 26, 2018 15:05 — forked from mlynch/generate.js
Stencil component generator
/*
To setup, place in scripts/st-generate.js and add
"st:generate": "node scripts/st-generate.js"
To your npm scripts.
To generate a component in src/components/ run
npm run st:generate component my-component
var topmenuClass = '.ms-core-listMenu-horizontalBox';
$(topmenuClass + ' .ms-hidden').html('');
$(topmenuClass + ' ul li a span').not('[class="ms-navedit-editLinksIconWrapper"]').replaceWith(function () {
return $(this).html();
});
$(topmenuClass + ' ul li a span').not('[class="ms-navedit-editLinksIconWrapper"]').replaceWith(function () {
return $(this).html();
});
/*
* Original Sample: http://craftycodeblog.com/2010/05/15/asp-net-mvc-render-partial-view-to-string/
*/
public class HomeController : Controller
{
public ActionResult Index()
{
string MyModelData = "";