This file contains 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 div = document.createElement('div'); | |
div.innerHTML = atob('CjxkaXY+CiAgICA8cHJlPiAgICAgICAgTG9yZW0gSXBzdW0gaXMgc2ltcGx5IGR1bW15IHRleHQgb2YgdGhlIHByaW50aW5nIGFuZDxicj4gdHlwZXNldHRpbmcgaW5kdXN0cnkuIExvcmVtIElwc3VtIGhhcyBiZWVuIHRoZSBpbmR1c3RyeSdzPGJyPiBzdGFuZGFyZCBkdW1teSB0ZXh0IGV2ZXIgc2luY2UgdGhlIDE1MDBzLCB3aGVuIGFuIHVua25vd248YnI+IHByaW50ZXIgdG9vayBhIGdhbGxleSBvZiB0eXBlIGFuZCBzY3JhbWJsZWQgaXQgdG8gbWFrZSBhPGJyPiB0eXBlPGJyPiBzcGVjaW1lbiBib29rLiBJdCBoYXMgc3Vydml2ZWQgbm90IG9ubHkgZml2ZTxicj4gY2VudHVyaWVzLCBidXQgYWxzbyB0aGUgbGVhcCBpbnRvIGVsZWN0cm9uaWMgdHlwZXNldHRpbmcsPGJyPiByZW1haW5pbmcgZXNzZW50aWFsbHkgdW5jaGFuZ2VkLiBJdCB3YXMgcG9wdWxhcmlzZWQgaW4gdGhlPGJyPiAxOTYwczxicj4gd2l0aCB0aGUgcmVsZWFzZSBvZiBMZXRyYXNldCBzaGVldHMgY29udGFpbmluZzxicj4gTG9yZW08YnI+IElwc3VtIHBhc3NhZ2VzLCBhbmQgbW9yZSByZWNlbnRseSB3aXRoIGRlc2t0b3A8YnI+IHB1Ymxpc2hpbmcgc29mdHdhcmUgbGlrZSBBbGR1cyBQYWdlTWFrZXIgaW5jbHVkaW5nIHZlcnNpb25zIG9mPGJyPiBMb3JlbSBJcHN1bS48YnI+Cjxicj4KSXQgaXMgYSBsb25nIGVzdGFibGlzaGVkIGZhY3QgdGhhdCBhIHJlYWRlciB3aWxsIGJlIGRpc3RyYWN0 |
This file contains 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 prime = require('prime') | |
var emitter = require('prime/emitter') | |
var transition = require('transition') | |
var enhance = function(instance, method, parameters){ | |
var result = Fx.parent[method].apply(instance, parameters) | |
instance.event.emit(method, result) | |
return result | |
} | |
var Fx = prime({ |
This file contains 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
console.log = (function(log){ | |
return function(str) { | |
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;font-family:Comic Sans MS;font-size:13pt;'; | |
var args = Array.prototype.slice.call(arguments); | |
args[0] = '%c' + args[0]; | |
args.splice(1,0,css); | |
var speech = new SpeechSynthesisUtterance(); | |
speech.text = str; | |
window.speechSynthesis.speak(speech); |
This file contains 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 transform = (function(){ | |
for(var props = ['transform', 'webkitTransform', 'OTransform', 'msTransform', 'MozTransform'], i=0, max=props.length; i<max; i++){ | |
var prop = props[i] | |
if(prop in document.body.style){ | |
return function(element, transformation){ | |
element.style[prop] = transformation | |
} | |
} | |
} | |
})(); |
This file contains 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 Promise = require('promise') | |
var request = function(options){ | |
// faking async http request | |
setTimeout(options.success, 3000, { | |
zivc: 'use the force' | |
}) | |
} | |
var fakeAPI = { |
This file contains 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
"use strict"; | |
var COLORS = { | |
BOX: 'silver', | |
BEZIER: 'silver', | |
BACKGROUND : { | |
COLOR: 'whitesmoke', | |
TEXT: 'black' | |
}, | |
POINTS: 'gray', | |
GRID: 'rgba(80,80,80,0.1)', |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.IO; | |
namespace MvcApplication1.Controllers { | |
public class LessController : Controller { |
This file contains 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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Get.aspx.cs" Inherits="MvcApplication1.Views.Home.Get" %> | |
<html> | |
<head> | |
<link type="text/css" rel="Stylesheet" href="/less.mvc/Show/<%= ViewData["Name"] %>.css" | |
</head> | |
<body> | |
<h1 id="header" name="header"> This is the less source:</h1> | |
<pre> | |
<%= ViewData["Less"] %> | |
</pre> |
This file contains 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
/* LESS */ | |
@brand_color: #4D926F; | |
@other_color: rgb(166,255,122); | |
.common-rules{ | |
border:1px solid silver; | |
} | |
.font-rules{ |
This file contains 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 MvcApplication : System.Web.HttpApplication | |
{ | |
public static void RegisterRoutes(RouteCollection routes) | |
{ | |
// ... | |
routes.MapRoute( | |
"less", | |
"less.mvc/{action}/{name}.css", | |
new { controller = "Less", action = "Show" } |