Skip to content

Instantly share code, notes, and snippets.

Jmaxxz jmaxxz

Block or report user

Report or block jmaxxz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jmaxxz / Gist Access
Last active Dec 14, 2015
An example of how to access gist in a minecraft server running the computer mod. This allows the download of arbitrary code
View Gist Access
local function printUsage()
print( "Usages:" )
print( "gist <code> <filename>" )
local tArgs = { ... }
if #tArgs < 2 then
jmaxxz / CsrfPreventionFilter.cs
Last active Oct 7, 2015
A better anti CSRF mechanism than what is built into MVC
View CsrfPreventionFilter.cs
using System.Collections.Concurrent;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Helpers;
using System.Web.Http.Controllers;
using Newtonsoft.Json.Linq;
using IApiAuthorizationFilter = System.Web.Http.Filters.IAuthorizationFilter;
namespace System.Web.Mvc
jmaxxz / Program.cs
Created Apr 23, 2012
You can't handle the truth
View Program.cs
using System;
namespace Truth
class Program
static void Main(string[] args)
jmaxxz / gist:2040753
Created Mar 15, 2012
A worm I found in my website....
View gist:2040753
function get_tds_777($url)
return $content;
jmaxxz / QueryableResharperRules.xml
Created Jan 18, 2012
This rule set detects calls that are likely to cause runtime exceptions on IQueryable types. To add this rule set do: Resharper->Options->Custom Patterns ->Import
View QueryableResharperRules.xml
<Pattern Severity="ERROR" FormatAfterReplace="True" ShortenReferences="True" Language="CSHARP">
<Comment>FirstOrDefault not supported by all Queryable Types</Comment>
<ReplaceComment>Convert to supported version</ReplaceComment>
<Params />
<ExpressionPlaceholder Name="q" ExpressionType="System.Linq.IQueryable" ExactType="False" />
<ArgumentPlaceholder Name="x" Minimal="1" Maximal="-1" />
jmaxxz / yeah.cs
Created Dec 8, 2011
This is how it should be...kinda
View yeah.cs
public partial class _Default : System.Web.UI.Page
private BlobContainer _Container = null;
protected void Page_Load(object sender, EventArgs e)
// Get the configuration from the cscfg file
StorageAccountInfo accountInfo = StorageAccountInfo.GetDefaultBlobStorageAccountFromConfiguration();
jmaxxz / WinLion.Reg
Created Jul 25, 2011
Makes Window's scroll work like Lion's scroll
View WinLion.Reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
You can’t perform that action at this time.