Skip to content

Instantly share code, notes, and snippets.

View gravypower's full-sized avatar
🇦🇺

Aaron Job gravypower

🇦🇺
View GitHub Profile
@zdam
zdam / clojure-clr-webserver.cs
Created February 28, 2010 00:00
Use clojureCLR inside an asp.net MVC app
/*
* This is a litle tech demo to demonstrate using clojureCLR in a CLR web app.
*
* A custom IHttpHandler (ClojureHttpHandler) handles invocation of clojure code,
* and a custom IRouteHandler (ClojureRouteHandler) routes requests to the HttpHandler.
*
* See comments in the code for further detail.
*
* Cheers, zdam
* http://zimpler.com/blog/clojureclr-in-an-asp-net-mvc-app
@hgarcia
hgarcia / file0.cs
Created September 2, 2010 04:18
2008-01-20-css-parser-class-in--net.textile
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace LaTrompa.Web
{
public class CssParser
@danjac
danjac / gist:1315692
Created October 26, 2011 07:31
file upload
(ns file-uploadr.views.upload
(:require [file-uploadr.views.common :as common]
[noir.response :as res]
[noir.content.pages :as pages])
(:use noir.core
hiccup.core
hiccup.page-helpers
hiccup.form-helpers))
(defpage "/" []
@joeriks
joeriks / RoslynDynamicCompilation.cs
Created December 28, 2012 07:44
Add a piece of dynamically compiled code in memory with the help of Roslyn. (After this the Greeter class will be available and can be run from example from the immediate window in visual studio).
public static void AddGreeter()
{
AddInmemory("Greeter", @"using System;
class Greeter
{
public string Greet()
{
return ""Hello World"";
}
@phirefly
phirefly / gist:7120713
Created October 23, 2013 15:19
Basic bootstrap 3 nav in haml
%nav.navbar.navbar-default{role: "navigation"}
/ Brand and toggle get grouped for better mobile display
.navbar-header
%button.navbar-toggle{"data-target" => ".navbar-ex1-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.navbar-brand{href: "#"} Brand
/ Collect the nav links, forms, and other content for toggling
@svantreeck
svantreeck / JsonWebToken.cs
Created April 16, 2015 13:41
ServiceStack JWT Token validation for Auth0
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using ServiceStack.Text;
namespace ServiceStackAPI
{
public static class JsonWebToken