Skip to content

Instantly share code, notes, and snippets.

View micheledurante's full-sized avatar
🚌
beep beep

micheled micheledurante

🚌
beep beep
View GitHub Profile
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@rocarvaj
rocarvaj / .vimrc
Created April 27, 2012 21:28
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
@csharpforevermore
csharpforevermore / CustomGlobal.cs
Created January 12, 2015 04:20
Custom Global.asax.cs for Umbraco 7
public class CustomGlobal : UmbracoApplication
{
public void Init(HttpApplication application)
{
application.PreRequestHandlerExecute += application_PreRequestHandlerExecute;
application.BeginRequest += this.Application_BeginRequest;
application.EndRequest += this.Application_EndRequest;
application.Error += Application_Error;
}