Skip to content

Instantly share code, notes, and snippets.

0x4F219303761a6A33eD36EB44bb8f1b206F48367b
0xC5427292966D4BCE0b8a33F193A31cFED17a1cE3

Keybase proof

I hereby claim:

  • I am legogris on github.
  • I am legogris (https://keybase.io/legogris) on keybase.
  • I have a public key ASDSikTBNYae9lzJPdd3V9oP3yiWqtt3bWcFEnjnzwqstgo

To claim this, I am signing this object:

///<summary>
/// Prevent the auth cookie from being reset for this action, allows you to
/// have requests that do not reset the sliding login timeout.
/// </summary>
public class DoNotResetAuthCookieAttribute : ActionFilterAttribute
{
public override void OnResultExecuting(ResultExecutingContext context)
{
context.HttpContext.Items.Add("dontRenewAuthCookie", true);
}
public static void UseCactiCookieAuthentication(this IApplicationBuilder app, IHostingEnvironment environment)
{
var cookieName = "AuthCookie";
app.Use(next => context =>
{
context.Response.OnStarting(state =>
{
if(context.Items.ContainsKey("dontRenewAuthCookie"))
{
var response = (HttpResponse) state;
@Legogris
Legogris / alethzero_contract_result
Last active January 13, 2016 14:29
contract test
.code:
PUSH 1
PUSH 1ABF
MSTORE8
PUSH #[$00000000…00000000]
DUP1
PUSH [$00000000…00000000]
PUSH 0
CODECOPY
button.btn-lg.btn-primary {
background-color: #20265B;
background-image: none;
box-shadow: none;
border-radius: 23px;
border-width: 2px !important;
border: 2px #e92e71 solid;
}
button.btn-lg.btn-primary.btn-top:hover {
@Legogris
Legogris / FoobarE.idr
Created October 12, 2015 20:40 — forked from jfdm/FoobarE.idr
module FoobarE
import Effects
import Effect.State
import Effect.StdIO
MyProg : Type -> Type
MyProg rTy = Eff rTy ['mystate ::: STATE (List Nat), STDIO]
register : Nat -> MyProg ()
module Main
import Effects
import Effect.State
register : Nat -> Eff Nat [STATE (List Nat)]
register x = do update (x::); pure (length !get)
main : IO ()
main = putStrLn (show (runPureInit [[128]] (register 2)))