Skip to content

Instantly share code, notes, and snippets.

View jimbuck's full-sized avatar

Jim Buck jimbuck

View GitHub Profile
@jimbuck
jimbuck / AuthenticationHelper.cs
Created August 13, 2014 21:52
.NET helper class for checking user credentials against Windows.
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace System.Security.Principal
{
/// <summary>
/// Leverages the windows UI to prompt for a password
/// </summary>
public static class AuthenticationHelper
@jimbuck
jimbuck / InvalidModelException.cs
Created August 11, 2014 17:57
C# Validation Helper
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
namespace JimmyBoh.Common.Exceptions
{
public class InvalidModelException : Exception
{

Just go to stackoverflow.com then define this in your Javascript console:

(function(myFkey) {
  console.log("Ok, let's hack you some shiny unicoins! <3 /dev/alias (www.devalias.net)")
  console.log("The powers that be say you can only mine a rock every 10sec, so we do it every 11sec to be sure.")
  window.setInterval(function(){
    $.get( "http://stackoverflow.com/unicoin/rock", function( data ) {
      var rockId = data.rock;
      $.post( "http://stackoverflow.com/unicoin/mine?rock=" + rockId, { fkey: myFkey })
 .done(function( data ) {