Skip to content

Instantly share code, notes, and snippets.

View mikealexander's full-sized avatar
💻

Mike Alexander mikealexander

💻
View GitHub Profile
@santaklouse
santaklouse / CrossOver.sh
Last active May 12, 2025 01:10
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@arthernan
arthernan / NewAuthorize
Created April 2, 2013 15:15
Improved AuthorizeAttribute for MicroSoft MVC4 WebAPI
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Principal;
using System.Threading;
using System.Web;
using System.Web.Http;
using System.Web.Http.Controllers;