Skip to content

Instantly share code, notes, and snippets.

@hgarcia
hgarcia / WebPageRouteHandler.cs
Created July 9, 2010 03:38
Routing with Razor and WebPages
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Web;
using System.Web.Compilation;
using System.Web.Routing;
using Microsoft.WebPages;
/// <summary>
@hgarcia
hgarcia / test
Created September 18, 2017 23:58
Hello!
----------
Welcome to StackEdit!
===================
Hey! I'm your first Markdown document in **StackEdit**[^stackedit]. Don't delete me, I'm very helpful! I can be recovered anyway in the **Utils** tab of the <i class="icon-cog"></i> **Settings** dialog.
----------
@hgarcia
hgarcia / cloudSettings
Created January 13, 2017 04:45
Visual Studio Code Sync Settings GIST
{"lastUpload":"2017-01-13T04:45:46.472Z"}
@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
@hgarcia
hgarcia / blow.erl
Created April 17, 2012 03:28
Lerning Erlang 6
nevercalled() ->
called.
infinite([]) ->
ended;
infinite([X|T]) ->
infinite([X|T]),
nevercalled().
@hgarcia
hgarcia / module_info.erl
Created April 3, 2012 14:41
Learning Erlang 5
1> htmltags:module_info().
[{exports,[{anchor,1},{module_info,0},{module_info,1}]},
{imports,[]},
{attributes,[{vsn,[182074441483321614685265050785950543270]}]},
{compile,[{options,[]},
{version,"4.7.3"},
{time,{2012,3,26,4,0,5}},
{source,"/home/hernan/Dropbox/erlang/manuscript/code/htmltags.erl"}]}]
@hgarcia
hgarcia / compiling.erl
Created March 26, 2012 03:31
Lerning Erlang 4
1> c(htmltags).
{ok,htmltags}
@hgarcia
hgarcia / comparing_types.erl
Created March 19, 2012 04:11
Lerning Erlang 3 comparisons
1> atom > 5.
true
2> atom > complexAtom.
false
3> complexAtom > atom.
true
4> atom > "A".
@hgarcia
hgarcia / dynamic_typing.erl
Created March 19, 2012 03:38
Learning Erlang 3 Variables
1> 1 + 1.0.
2.0
2> 2.0 + 1.
3.0
3> 4 + 45.
49
4> 45 /0.5.
@hgarcia
hgarcia / partition.erl
Created March 18, 2012 22:58
Lerning Erlang 2
1> lists:partition(fun(X) -> X rem 2 == 1 end, lists:seq(0, 20)).
{[1,3,5,7,9,11,13,15,17,19], [0,2,4,6,8,10,12,14,16,18,20]}