Skip to content

Instantly share code, notes, and snippets.

View objectcraftworks's full-sized avatar

objectcraftworks

View GitHub Profile
pragma solidity ^0.4.24;
contract Sample {
uint[] values;
function justGasSpendingTx(uint gasToSpend) public {
uint gasLeftAtStart = gasleft();
@objectcraftworks
objectcraftworks / HandleErrorWithViewDataAttribute.cs
Last active December 20, 2015 03:39
ASP.NET/MVC4 HandleError Filter to keep the ViewData set by Controller for Error View & It's layouts
using System;
using System.Linq;
using System.Web.Mvc;
namespace ObjectCraftworks
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class HandleErrorWithViewDataAttribute:HandleErrorAttribute
{
public override void OnException(ExceptionContext filterContext)
@objectcraftworks
objectcraftworks / kill_iisexpress
Created July 19, 2013 16:41
Powershell script to kill IISExpress and worker processes
get-process | where { $_.name -match "WebDev" -or $_.name -match "IISExpress" } | kill
@objectcraftworks
objectcraftworks / vs_2012_suppress_uppercase_menu.reg
Last active December 19, 2015 11:48
Registry settings to Suppress Screaming Uppercase Menu in VS 2012
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General]
"SuppressUppercaseConversion"=dword:00000001