Skip to content

Instantly share code, notes, and snippets.

Avatar
😁
Working on LLBLGen Pro

Frans Bouma FransBouma

😁
Working on LLBLGen Pro
View GitHub Profile
@FransBouma
FransBouma / Session_Start migration.md
Created Jun 10, 2020
ASP.NET MVC global.asax Session_Start migration to ASP.NET Core 3 middleware
View Session_Start migration.md

ASP.NET MVC Session_Start migration to ASP.NET Core 3 middleware

When you migrate your site from ASP.NET MVC on netfx to ASP.NET Core on .net core you might run into the problem what to do with the Session_Start method in global.asax: what's the equivalent in ASP.NET Core ?

Searching on the internet will likely make you end up on forum posts / stackoverflow posts telling you to 'write some middleware', but what does that mean? How to do that? If you feel as lost as I was, read on as this post is for you.

The request pipeline

@FransBouma
FransBouma / index.htm
Last active Jun 24, 2019
Starfield JS
View index.htm
<!DOCTYPE HTML>
<html>
<head>
<title>Simple full-browser star field effect in JS. By Otis / Infuse Project.</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
</style>
@FransBouma
FransBouma / MetroExodus_PMHacks_Otis.CT
Last active May 26, 2019
Metro Exodus photomode hacks. v1.0.1. Should work for steam version now too. The FoV override could lead to a timer issue inside the game engine so everything slows down to a crawl. I have no idea why.
View MetroExodus_PMHacks_Otis.CT
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="28">
<CheatEntries>
<CheatEntry>
<ID>3</ID>
<Description>"Enable ansel everywhere"</Description>
<LastState Activated="1"/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>// Disable Ansel check
// By Otis_Inf
View FluoroDuoTone.fx
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Fluoro Duotone shader for Reshade.
// By Frans Bouma, aka Otis / Infuse Project (Otis_Inf)
// https://fransbouma.com
//
// This shader has been released under the following license:
//
// Copyright (c) 2018-2019 Frans Bouma
// All rights reserved.
View KuwaharaAnisotropic.fx
/*
A pretty close port of Anisotropic Kuwahara Filtering on the GPU
source:
www.kyprianidis.com
Paper : http://www.kyprianidis.com/p/pg2009/jkyprian-pg2009.pdf
Preview App' : https://code.google.com/archive/p/gpuakf/downloads
Code : https://code.google.com/archive/p/gpuakf/source/default/source
Ported over to Reshade by Eideren
View Kuwahara.fx
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
// By Otis / Infuse Project
///////////////////////////////////////////////////////////////////
uniform int XRadius <
ui_type = "drag";
ui_min = 1; ui_max=16;
> = 2;
@FransBouma
FransBouma / gist:eeb7f7ac5f86ac03ed27e54995d47fbb
Created Aug 22, 2018
EF Core / LLBLGen Pro insert batching tests on postgresql (sequenced field + normal field)
View gist:eeb7f7ac5f86ac03ed27e54995d47fbb
Batchsize: 0
Batch size: 0, runs: 10: EF Core: 77,44ms (3,74). LLBLGen Pro: 479,17ms (13,55)
Batchsize: 10
Batch size: 10, runs: 10: EF Core: 103,15ms (1,63). LLBLGen Pro: 93,56ms (3,54)
Batchsize: 20
Batch size: 20, runs: 10: EF Core: 91,07ms (0,87). LLBLGen Pro: 77,89ms (0,66)
Batchsize: 30
Batch size: 30, runs: 10: EF Core: 87,11ms (0,89). LLBLGen Pro: 73,91ms (0,88)
Batchsize: 40
Batch size: 40, runs: 10: EF Core: 86,49ms (5,31). LLBLGen Pro: 89,78ms (47,44)
@FransBouma
FransBouma / AnselAlways.md
Last active May 28, 2020
How to remove the restrictions put on Ansel enable by a game
View AnselAlways.md

How to remove enable restrictions on Ansel in an Ansel-supporting game

How does enabling Ansel work

Ansel is an NVidia technology which enables a photomode with shaders in pre-defined games. A game doesn't support Ansel out of the box, it has to be setup for that, which is usually done by using the Ansel SDK. The Ansel SDK is available to people who register for an account with NVidia, and I don't have such an account, so all I provide here is what I figured out myself from what NVidia provided online and what I've seen in game code.

Ansel works with call-backs, which means the game has to register a function with Ansel which is then called when Ansel needs

@FransBouma
FransBouma / Howtouse.md
Created Apr 21, 2018
Ansel Everywhere cheat table for Mass Effect Andromeda.
View Howtouse.md

How to use

  • start game
  • start cheat engine
  • load cheat table
  • load level
  • enable the 2 entries.

Be aware it doesn't work in the cutscene right after loading a level, because ansel then isn't fully initialized. So it might be you run into the situation where you enable ansel in a cutscene and the game hangs. However this is still much more stable than

View FarCry4.CT
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="18">
<CheatEntries>
<CheatEntry>
<ID>425</ID>
<Description>"SCREENSHOTTING"</Description>
<LastState Value="" Activated="0" RealAddress="00000000"/>
<Color>0000FF</Color>
<GroupHeader>1</GroupHeader>
<CheatEntries>
You can’t perform that action at this time.