Skip to content

Instantly share code, notes, and snippets.

@AraHaan
AraHaan / GlobalUsings.cs
Created July 30, 2021 23:25
StyleCop bug reproduction.
// <copyright file="GlobalUsings.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
global using System;
@AraHaan
AraHaan / main.asm
Created July 15, 2021 22:49
Some old asm code of mine.
TITLE main.asm
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
PUBLIC _memcpy
@AraHaan
AraHaan / ThemedForm.cs
Last active May 11, 2020 15:53
Broken drawing of the caption buttons (minimize, maximize, close & help buttons). On Forms larger than 300 width it seems the buttons would before get drawn in the wrong spot aka before where they should get drawn to. This happens on netcoreapp3.1.
// Copyright (c) 2014-2020, Els_kom org.
// https://github.com/Elskom/
// All rights reserved.
// license: MIT, see LICENSE for more details.
namespace Els_kom.Controls
{
using System;
using System.ComponentModel;
using System.Diagnostics;
@AraHaan
AraHaan / tests.txt
Last active April 30, 2020 09:59
Unit Test output
CSC : warning CA1824: Mark assemblies with NeutralResourcesLanguageAttribute [C:\packages\XmlAbstraction\src\XmlAbstraction\src\XmlAbstraction.csproj]
CSC : warning CA1824: Mark assemblies with NeutralResourcesLanguageAttribute [C:\packages\XmlAbstraction\src\XmlAbstraction\src\XmlAbstraction.csproj]
CSC : warning CA1824: Mark assemblies with NeutralResourcesLanguageAttribute [C:\packages\XmlAbstraction\src\XmlAbstraction\src\XmlAbstraction.csproj]
CSC : warning CA1824: Mark assemblies with NeutralResourcesLanguageAttribute [C:\packages\XmlAbstraction\src\XmlAbstraction\src\XmlAbstraction.csproj]
CSC : warning CA1824: Mark assemblies with NeutralResourcesLanguageAttribute [C:\packages\XmlAbstraction\src\XmlAbstraction\src\XmlAbstraction.csproj]
CSC : warning CA1824: Mark assemblies with NeutralResourcesLanguageAttribute [C:\packages\XmlAbstraction\src\XmlAbstraction\src\XmlAbstraction.csproj]
C:\Users\User\.nuget\packages\coverlet.msbuild\2.8.1\build\coverlet.msbuild.targets(7,5): warning : [coverlet] BadImag
@AraHaan
AraHaan / Program.cs
Created April 28, 2020 20:46
The C# program used to execute the c# scripts that makes creates a windows forms application.
namespace TestImageZooming
{
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using Microsoft.CodeAnalysis.CSharp.Scripting;
using Microsoft.CodeAnalysis.Scripting;
internal static class Program
@AraHaan
AraHaan / bmpconversionstuff.cs
Last active February 20, 2020 21:32
Some bmp converter that should convert 256 color bitmap data to an Crash Bandicoot Texture Chunk.
private void Menu_ConvertBMP()
{
byte[] data = FileUtil.OpenFile(out string fileName, FileFilters.BMP);
if (data == null)
return;
string ename = fileName.Substring(0, 5);
// first things first generate some stuff.
List<byte> fileHeader = new List<byte>();
fileHeader.AddRange(BitConverter.GetBytes((short)0x1234));
fileHeader.AddRange(BitConverter.GetBytes((short)1));
namespace GitBuildInfo
{
/// <summary>
/// A MSBuild task that generates the msbuild information for an assembly.
///
/// Note: use in the BeforeBuild target.
/// </summary>
public class GitBuildInfoGenericTask : GitBuildInfoTask
{
/// <inheritdoc/>
@AraHaan
AraHaan / ErrorLogLister.csproj
Created April 23, 2019 16:48
ErrorLogLister - a error log lister example Windows Forms application for .NET Core.
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F0EE9988-DA2A-431C-9EDB-4F1A505D3030}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>ErrorLogLister</RootNamespace>
<AssemblyName>ErrorLogLister</AssemblyName>