Skip to content

Instantly share code, notes, and snippets.

Kasper Fabæch Brandt poizan42

Block or report user

Report or block poizan42

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
poizan42 / EwsId_format.txt
Last active Jun 28, 2018
EwsId reverse engineered format
View EwsId_format.txt
IdStorageType (byte):
MailboxItemSmtpAddressBased = 0, // Exchange 2007 (EwsLegacyId)
PublicFolder = 1,
PublicFolderItem = 2,
MailboxItemMailboxGuidBased = 3,
ConversationIdMailboxGuidBased = 4,
ActiveDirectoryObject = 5, // Exchange 2013
MailboxItemMailboxGuidBasedWithFallback = 6 // Exchange 2016
CompressionId (byte):
poizan42 /
Last active Jan 30, 2018
Update links to Spinnerette comics to current format
import sys
from datetime import datetime
import re
import urllib2
from bs4 import BeautifulSoup
wayback_prefix = ''
newformat_prefix = ''
cachef = open('spinny-cache', 'a+')
View minimal1.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
poizan42 / MoveAnyFile.ps1
Created Nov 24, 2017
PowerShell script for moving / renaming files with otherwise invalid filenames
View MoveAnyFile.ps1
param([String]$existingFilename, [String]$newFilename)
$signature = @'
[DllImport("kernel32.dll", ExactSpelling=true, CharSet=CharSet.Unicode, SetLastError=true)]
public static extern uint MoveFileW(
string lpExistingFileName, string lpNewFileName);
$type = $null
poizan42 / DeleteAnyFile.ps1
Last active Nov 24, 2017
PowerShell script for deleting files with otherwise invalid filenames
View DeleteAnyFile.ps1
$signature = @'
[DllImport("kernel32.dll", ExactSpelling=true, CharSet=CharSet.Unicode, SetLastError=true)]
public static extern uint DeleteFileW(
string lpFileName);
$type = $null
poizan42 / StreamedXmlReader.cs
Created Nov 1, 2017
XmlReader that supports reading a document from a stream with multiple documents
View StreamedXmlReader.cs
using System.IO;
using System.Xml;
internal class StreamedXmlReader : XmlTextReader
private bool eof;
public override bool EOF => base.EOF || eof;
public StreamedXmlReader(TextReader input) : base(input)
poizan42 /
Created Sep 19, 2017
Prints full stack trace of every thread in a dotnet core process out to stdout
lldb --attach-name dotnet -o "plugin load" -o "eestack" -o "process detach" -o "exit"
poizan42 / Makefile
Last active Jul 30, 2018
Demonstration of running 32-bit code on WSL
View Makefile
call32test: call32test.o call32.o
gcc -g $^ -o $@
call32test.o: call32test.c
gcc -g -c $< -o $@
call32.o: call32.asm
nasm -f elf64 call32.asm -o call32.o
View kittensgame-yarn-broken-decoded.json
"saveVersion": 15,
"resources": [
"name": "catnip",
"value": 143495309.65551314,
"unlocked": true,
"isHidden": false
poizan42 / eratosthenes.cs
Last active Mar 14, 2016
Example showing the problem described in icsharpcode/ILSpy#684. Code originally written for [02242 Program Analysis](, the language used is called While+ (but note that there are a couple of slightly different languages with that designation used in analysis and semantics litterature).
View eratosthenes.cs
// Program
static int Main(string[] array)
int[] array2 = new int[1000];
int num = int.Parse(Console.ReadLine());
if ((num >= 1000) ?? (num < 2))
You can’t perform that action at this time.