Skip to content

Instantly share code, notes, and snippets.

View AniAko's full-sized avatar
🎯
Focusing

Coop AniAko

🎯
Focusing
View GitHub Profile
@AniAko
AniAko / Vin-dicated.user.js
Last active July 21, 2016 20:36
Happy script that calls on vin diesel to join your web browsing experience XD
// ==UserScript==
// @name Vin-dicated
// @description Vin Diesel appears (takes up to 10 seconds) and begins enforcing your web surfing experience
// @namespace AniAko
// @version 1
// @include /^https?://.*/
// @grant none
// @noframes
// ==/UserScript==
@AniAko
AniAko / gist:3f955b5ad9a71f17635e
Last active April 3, 2019 13:43 — forked from frankgeerlings/gist:1711560
An update on https://gist.github.com/frankgeerlings/1711560 MVC doesn't like the missing trailing slash on the URI authority (empty path), it's against HTTP/1.1 requirements as well it seems.
// Put this in Global.asax.cs
protected void Application_BeginRequest(object sender, EventArgs e)
{
// Do Not Allow URL to end in trailing slash
string url = HttpContext.Current.Request.Url.AbsolutePath;
if (string.IsNullOrEmpty(url)
|| url.Trim() == "/"
|| url.Trim() == "\\") return;