Skip to content

Instantly share code, notes, and snippets.

@smoogipoo
smoogipoo / qemu-dont-capture-on-start.patch
Created September 18, 2023 08:22 — forked from thnikk/qemu-dont-capture-on-start.patch
prevents evdev passthrough from being captured on guest startup
diff --git a/ui/input-linux.c b/ui/input-linux.c
index 9720333..abb4e04 100644
--- a/ui/input-linux.c
+++ b/ui/input-linux.c
@@ -335,12 +335,6 @@ static void input_linux_complete(UserCreatable *uc, Error **errp)
}
qemu_set_fd_handler(il->fd, input_linux_event, NULL, il);
- if (il->keycount) {
- /* delay grab until all keys are released */
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
// Works if you uncomment this line.
Console.WriteLine(Marshal.OffsetOf(typeof(Struct), nameof(Struct.A)));
// Fails if the above line is commented.
method(typeof(Struct));
return;
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
namespace BenchmarksProject
{
public class BenchmarkFalseSharing
{
@smoogipoo
smoogipoo / Program.cs
Created April 14, 2023 11:07
Topological DrawNode Test
DrawFrame();
void DrawFrame()
{
DrawNode root = new CompositeDrawNode(0)
{
Children =
{
new DrawNode(1),
new BufferedDrawNode(2, new CompositeDrawNode(3)
using System;
public class C {
public void M(object obj) {
if (obj == null)
throw new ArgumentNullException("obj");
}
public void N(object obj) {
if (obj == null)
throw new ArgumentNullException(nameof(obj));
/*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes;
namespace BenchmarksProject
{
[MemoryDiagnoser]
@smoogipoo
smoogipoo / doc.md
Last active October 6, 2021 10:53
Dockerized diffcalc runner doc

Inputs

./run.sh      [sr|pp|all]     [--local-only]     [osu|taiko|catch|mania] [osu|taiko|catch|mania]
               ^^^^^^^^^       ^^^^^^^^^^^^       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               arg:mode       opt:local-only               arg:ruleset (one-or-more)

Outputs

@smoogipoo
smoogipoo / test.sh
Last active August 25, 2021 11:25
GC regions test
#!/bin/bash
git clone -b gc-testing https://github.com/smoogipoo/osu
cd osu
git checkout d714f8297d2d05d256d099092c71f69400c7f1e9
cd osu.Game.Rulesets.Osu.Tests
dotnet publish -c:Release -r:linux-x64
@smoogipoo
smoogipoo / offsets.md
Last active September 28, 2023 04:52
Master doc on offsets in osu!

Last updated: 2021-07-27

How offsets and latency work

This is the pictorial representation that I'll use to explain how a player's timings could come about:

            hitobject     track latency    beat (track)
               vvv             vvv             vvv
Track: ---------H---T---------H---T---------H---T---------H---T-------------
User: -------------K---S---------K---S---------K---S---------K---S---------