This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QuickGlanceFormatter < ActiveSupport::Logger::SimpleFormatter | |
def call(severity, timestamp, progname, message) | |
m = message + "\n" | |
if m =~ /^Started ([A-Z]+) (.+)/m | |
"\033[34m\n#{$1} #{$2}\033[0m" | |
elsif m =~ /^Processing by (.+)/m | |
"\033[34m↳ #{$1}\033[0m" | |
elsif m =~ /^Completed (\d\d\d) (.+)/m | |
status = $1 | |
rest = $2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var moment = require('moment'); | |
document.body.innerHTML = moment('5th Jan 2018', 'Do MMM YYYY'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert('hello'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var plastiq = require('plastiq'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
var Linter = require('./linter'); | |
var cheerio = require('cheerio'); | |
function HtmlPage(html) { | |
this.dom = cheerio.load(html); | |
} | |
HtmlPage.prototype.all = function(selector) { | |
return this.dom(selector); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = require('browserify-client').connect('http://95.85.22.215:4000'); | |
client.require('plastiq', '1.0.0', function(err, plastiq) { | |
plastiq.attach(document.body, function() { | |
return plastiq.html('p', 'plastiq was required dynamically'); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var plastiq = require('plastiq'); | |
var inspect = require('plastiq-inspect'); | |
plastiq.append(document.body, function() { | |
return inspect({ | |
x: [1,2,"three"], | |
y: { z: [4,5,6] } | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MutationBuilder<T> implements Builder<T> { | |
protected Factory<T> factory; | |
protected MutationBuilder(Factory<T> factory) { | |
this.factory = factory; | |
this.mutations = new ArrayList<Mutation<T>>(); | |
} | |
protected interface Mutation<T> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var routism = require('routism'); | |
var routes = routism.compile([{ pattern: '/fruit/:name', route: 'fruit' }]); | |
var path = '/fruit/granny+smith'; | |
document.body.innerHTML = JSON.stringify(routes.recognise(path)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var plastiq = require('plastiq'); | |
var h = plastiq.html; | |
function render(model) { | |
return h('div.content', | |
h('h1', 'People'), | |
h('ol', | |
model.people.map(function (person) { | |
return renderPerson(model, person); | |
}) |