Skip to content

Instantly share code, notes, and snippets.

View ruud's full-sized avatar

Ruud ruud

View GitHub Profile
const recast = require("recast");
const cheerio = require('cheerio')
const Parser = require("fastparse");
const n = recast.types.namedTypes;
const b = recast.types.builders;
/**
* Webpack loader for https://github.com/Polymer/lazy-imports
* Parse html content and return object with lazy groups
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<title>Polymer</title>
<base href="https://polygit.org/polymer+v1.8.1/webcomponentsjs+v1.0.1/shadycss+webcomponents+v1.0.1/components/">
package com.benmccann.example.schema;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.net.URL;
import java.util.Arrays;
/*\
* Controller-mixin pattern
\*/
// At it's simplest:
myModule
.controller('aCtrl', function($scope, aCtrlMixin1, aCtrlMixin2, condition) {
if (condition) {
aCtrlMixin1($scope)
} else {
package controllers;
import com.fasterxml.jackson.databind.ObjectMapper;
import models.Computer;
import play.mvc.*;
import play.data.Form;
import java.util.Map;
public class Application extends Controller {