Skip to content

Instantly share code, notes, and snippets.

View gon250's full-sized avatar
💃
I may be slow to respond.

Gonzalo gon250

💃
I may be slow to respond.
View GitHub Profile
@gon250
gon250 / gist:2664b477a86e9df187d1
Last active September 21, 2015 11:44
X-Frame-Options
public override void OnActionExecuting(ActionExecutingContext context)
{
var siteId = this._siteDataProvider.GetSiteId(context.HttpContext.Request.Url.Host);
HttpResponseBase response = context.HttpContext.Response;
string userAgent = context.HttpContext.Request.UserAgent;
if (userAgent.Contains("MSIE 8") || userAgent.Contains("MSIE 9"))
{
switch (siteId)
{
case (int)SiteEnum.A:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
(function ($) {
/**
* @function
* @property {object} jQuery plugin which runs handler function once specified element is inserted into the DOM
* @param {function} handler A function to execute at the time when the element is inserted
* @param {bool} shouldRunHandlerOnce Optional: if true, handler is unbound after its first invocation
* @example $(selector).waitUntilExists(function);
*/
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.Reflection;
namespace Solution.IoC
{
public class DependencyInjectionProvider
{
private IKernel _kernel;
private void SetUpDependencyInjection()
{
//create _kernel
_kernel = new StandardKernel();