Skip to content

Instantly share code, notes, and snippets.

using System;
public class Program
{
static int i = 0;
static Test test = new Test();
static Test GetTest => (i % 2) == 0 ? null : test;
static string FuncWithSideEffect() {
Console.WriteLine("Called inner");
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@filmor
filmor / keybase.md
Created November 6, 2019 06:37
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@filmor
filmor / Initialize CLR via ctypes.ipynb
Last active December 30, 2022 18:34
Initialize CLR via ctypes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@filmor
filmor / eü_konvertieren.ipynb
Created April 27, 2019 18:14
Convert Einheitsübersetzung from a given APK to a (zipped) Sword module
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@filmor
filmor / dynamic.py
Last active March 7, 2024 15:16
Support for DLR types
from System.Dynamic import DynamicObject as _do
from System import Func, Array, Object
from System.Runtime.CompilerServices import CallSite
from Microsoft.CSharp.RuntimeBinder import (
Binder, CSharpBinderFlags, CSharpArgumentInfoFlags,
RuntimeBinderException, CSharpArgumentInfo
)
class _Injected:
@filmor
filmor / magic_logger.py
Created January 6, 2015 14:39
Magic logger class for python
from logging import Logger, getLogger
class MagicLogger:
def __getattr__(self, name):
try:
from sys import _getframe
from inspect import getmodule
frame = _getframe(1)
mod_name = getattr(getmodule(frame), "__name__", None)