Skip to content

Instantly share code, notes, and snippets.

@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@Slluxx
Slluxx / patchNXapps.md
Last active December 29, 2024 22:38
How to patch Nintendo Switch Applications in IDA

Patching the Youtube App

In short

  1. Extract the main NSO
  2. Convert it into an ELF (to strip header/hashes)
  3. Load it into Ida, find the function and patch the bytes back into the binary
  4. Convert the ELF back into NSO
  5. Use the nso as exefs patch or re-import it into the NCA/NSP
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
public final class MiniMessageTemplate {
private MiniMessageTemplate() {}
public static final StringTemplate.Processor<Component, RuntimeException> MM = stringTemplate -> {
String interpolated = STR.process(stringTemplate);
MiniMessage mm = MiniMessage.miniMessage();
return mm.deserialize(interpolated);
@Minikloon
Minikloon / Instructions.md
Created July 7, 2024 11:03
Minecraft Player Nametags with Custom RGB.

Preview

-Naive solution:
  1. Create a team, set its prefix or suffix to the component you want.
  2. In the PlayerInfoUpdatePacket, set the Username to ""
  3. Add "" to the team.

The player entity on the client stores the username from the player list entry with a matching UUID.

Reverse Engineering SP110e LED Controller

Through Bluetooth sniffing, using this method I've been able to (semi reliably) control the SP110e controller via Homebridge.

You can find this controller for very cheap here: https://www.aliexpress.com/item/4000773623427.html?spm=a2g0o.productlist.0.0.4f09329cJ7C1H4&algo_pvid=542e757b-587f-4540-8652-2195883f1349&algo_expid=542e757b-587f-4540-8652-2195883f1349-0&btsid=0bb0622a16012309671478585ed4bd&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

This entire guide is for Bluetooth LE libraries, and uses hexidecimal.

LE configuration

@Minikloon
Minikloon / ComponentWrapper.java
Last active December 29, 2024 22:36
Kyori Adventure Component Word Wrapping
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextDecoration;
import net.minestom.server.utils.StringUtils;
import java.util.*;
public class ComponentWrapper {
@milnak
milnak / Install Windows 98 in 86Box.md
Last active December 29, 2024 22:36
Install Windows 98 in 86Box

Install Windows 98 SE in 86Box

Read the 86Box documentation for more details about these options.

Install 86Box

Use scoop to install easily.

scoop install 'main/7zip'
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active December 29, 2024 22:17
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@podgorskiy
podgorskiy / FrustumCull.h
Created July 12, 2017 10:33
Ready to use frustum culling code. Depends only on GLM. The input is only bounding box and ProjectionView matrix. Based on Inigo Quilez's code.
#include <glm/matrix.hpp>
class Frustum
{
public:
Frustum() {}
// m = ProjectionMatrix * ViewMatrix
Frustum(glm::mat4 m);
@lewisrodgers
lewisrodgers / tD19.bitbucket-piplines.yml
Last active December 29, 2024 22:14
Chrome extension basic pipeline
pipelines:
branches:
develop:
- step:
name: Update
script:
- apt-get update
- apt-get -y install jq zip
- FILE_NAME=crx.zip
- zip -r $FILE_NAME ./app