Skip to content

Instantly share code, notes, and snippets.

View DarkStoorM's full-sized avatar

Bartosz Sieprawski DarkStoorM

View GitHub Profile
@DarkStoorM
DarkStoorM / Mod - Full Random.md
Last active December 7, 2024 23:38
osu!taiko mod for osu!(lazer)
@DarkStoorM
DarkStoorM / Subject-Oriented Inpainting.md
Last active November 12, 2024 03:19
Random document on Subject-Oriented Inpainting and Detailing in Stable Diffusion + my personal workflow.

Stable Diffusion, Subject-Oriented Inpainting

Caution

24 Aug 2024 - Please keep in mind that this document is obsolete and lots of things have changed since its release, this document is not maintained in terms of technicalities. Most things still apply as I still do things with the same workflow, except the settings at this point are a "whatever" and I use Hypertile with the recent A1111 releases (switched to 1.10), so the samplers/CFG etc. settings don't really matter unless you use things like XL Turbo or whatever people release today, use whatever is recommended. Also "enhancers" in prompts are just a meme.

Table of Contents:

Settings

Model: any 1.5 base (no difference on 2.1 anyway, just the embeddings don't work, that would require changing the prompt)

Size: 512x512, Steps: 100, CFG scale: 7, Seed: 2583996050

Prompt

@DarkStoorM
DarkStoorM / twitch_skip_redemption_window.md
Last active November 14, 2024 06:52
Twitch spam redemptions

Spam channel points rewards by skipping the redemption window without Twitch API

  • open Devtools -> Network
  • filter requests by gql.twitch

a

  • clear requests list and redeem a channel points reward
  • right click the request and copy as fetch

Convert VSCode theme to Visual Studio 2022

You have probably stumbled upon this video, which explains how to convert your favorite VSCode theme to also be usable in Visual Studio 2022. Well, it's not entirely correct, it still applies, but there has to be some clarification.

As the video lacks some information, I will try to make it as easy as possible.

Table of Contents:

TypeScript - infer type of second argument based on the first argument inside classes

class Selector<Interface> {
  public where<Key extends keyof Interface>(
    key: keyof Pick<Interface, Key>,
    value: Interface[Key]
  ) {
    // [implementation]
  }
@DarkStoorM
DarkStoorM / mixins.ts
Last active October 31, 2021 20:45
TypeScript Inject Mixins from multiple classes
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/**
* Applies the implementation of baseConstructors to the derived constructor - injects methods into
* the given class.
*
* @param {{ new (): T }} derivedConstructor Class we want to inject mixins into
* @param {{ new (): unknown }[]} baseConstructors Array of classes we want to take mixins from
*/
export function ApplyMixins<T>(
@DarkStoorM
DarkStoorM / laravel-route-separation.md
Last active June 27, 2021 13:48
Laravel Route Separation experiment

Laravel Route Separation

After poking around with route separation, I found this (a bit messy and ugly) way to keep routes in separate files without touching the RouteServiceProvider at all - the only update is to change the web namespace to 'routes/web/main.php' since this will be the definitions file for all routes.

This is more of an experiment, not a recommended way of doing this. You could also do this in RouteServiceProvider in a loop with glob.

First thing to do will be moving routes to a new directory: routes/web, which will only contain main.php and index.php files - main being the definitions file which will register route groups all together .

Let's assume we have a website, where we can edit our profile and change some private account settings. The structure would be something like the example below (not ideally of course, it's just a quick example, no one would structure a page like this):

@DarkStoorM
DarkStoorM / DictionaryExtensions.cs
Created May 16, 2021 23:03
[C#] Merge two Dictionaries together
using System.Collections.Generic;
using System.Linq;
public static class DictionaryExtensions
{
/// <summary>
/// <para />Merges this dictionary with another dictionary
/// <example>
/// <code>
/// Dictionary&lt;string, int&gt; dictionary = dictionary.MergeWith(otherDictionary);