Skip to content

Instantly share code, notes, and snippets.

Cristian Carlesso kentaromiura

Block or report user

Report or block kentaromiura

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:132065
public class MvcApplication : System.Web.HttpApplication
public static void RegisterRoutes(RouteCollection routes)
// ...
new { controller = "Less", action = "Show" }
View LessController.cs
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 {
View Show.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Show.aspx.cs" Inherits="MvcApplication1.Views.Home.Show" %>
<%= ViewData["Css"] %>
View Get.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Get.aspx.cs" Inherits="MvcApplication1.Views.Home.Get" %>
<link type="text/css" rel="Stylesheet" href="/less.mvc/Show/<%= ViewData["Name"] %>.css"
<h1 id="header" name="header"> This is the less source:</h1>
<%= ViewData["Less"] %>
View test1.less
/* LESS */
@brand_color: #4D926F;
@other_color: rgb(166,255,122);
border:1px solid silver;
View Swap vs RealSwap.cs
using System;
using System.Collections.Generic;
using System.Text;
public class MyClass
public static void Swap<T> (T a , T b){
T x = a;
a = b;
b = x;
View Kenta.Function.invoke.js
var tmp = Class.instantiate(this);
var init = this.prototype.initialize;
return tmp;
View Kenta.IOC.js
var IOC = new Class({
this.container = {};
register:function(id, component, options){
if($type(id) != 'string')throw new Error("No id to register");
if(!$chk(component))throw new Error("No component to register");
var o = options || {type:'singleton'};
this.container[id] = {type:o.type, component:component};
View test.htm
<title>Sarissa glitch with mootools</title>
<script type="text/javascript" src="sarissa.js"></script>
<script type="text/javascript" src="sarissa_ieemu_xpath.js"></script>
<script type="text/javascript" src="mootools-1.2.4-core-nc.js"></script>
<script type="text/javascript">
View Mootools.$type.and.ActiveXObject.htm
<title>Mootools $type and ActiveXObject</title>
<script type="text/javascript" src="mootools-1.2.4-core-nc.js"></script>
<script type="text/javascript">
var doc = new ActiveXObject("Msxml2.DOMDocument.4.0");
var source = '<root><burp decibel="too much" direction="front of you" save="none"></burp></root>';
doc.async = false;
You can’t perform that action at this time.