Skip to content

Instantly share code, notes, and snippets.

@joseraya
joseraya / snapshot-crawler.js
Created January 21, 2014 20:15
A node script that crawls a web site and stores snapshots (taken with zombie.js) to the file system. Based on code from this article: http://www.ng-newsletter.com/posts/serious-angular-seo.html
var Browser = require('zombie'),
url = require('url'),
fs = require('fs'),
$q = require('Q'),
saveDir = __dirname + '/_snapshots';
var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var stripScriptTags = function(html) {
@smockle
smockle / BundleConfig.cs
Last active August 31, 2018 11:49
Demonstrates how to use BundleTransformer in a C# ASP.NET MVC web application.
using System.Web;
using System.Web.Optimization;
using BundleTransformer.Core.Transformers;
namespace Project.App_Start {
public class BundleConfig {
public static void RegisterBundles(BundleCollection bundles) {
var styles = new Bundle("~/bundles/stylesheets")
.Include(
"~/Assets/Styles/*.css",