Skip to content

Instantly share code, notes, and snippets.

View BomberFish's full-sized avatar
🏫
getting schooled

Hariz BomberFish

🏫
getting schooled
View GitHub Profile
@stephancasas
stephancasas / IntelligenceLightView.swift
Created February 12, 2025 23:25
A basic SwiftUI expression of the native Apple Intelligence NSIntelligenceUILightView
//
// IntelligenceLightView.swift
//
// Created by Stephan Casas on 2/12/25.
//
import SwiftUI
import AppKit
struct IntelligenceLightView: NSViewRepresentable {
@velzie
velzie / manifest-v2-chrome.md
Last active May 8, 2025 12:53
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@velzie
velzie / chromeos-117-sudo-howto.md
Last active November 24, 2024 17:55
Re-Enable sudo from crosh on R117+ Chrome OS without recompiling

Short guide on how to bypass this:

image

If you haven't disabled rootfs verification, switch to vt-2 and run /usr/libexec/debugd/helpers/dev_features_rootfs_verification. Then reboot.

Inside crostini, download minioverride.c and compile it with gcc minioverride.c -o minioverride.so -shared (make sure gcc is installed)

In the files app, move minioverride.so into your downloads folder.

Also see https://github.com/zhuowei/CoreTrustDemo/blob/main/littlemis.txt for my previous notes
first time X509ChainCheckPathWithOptions, param3 (options) is null
second time X509ChainCheckPathWithOptions, param3 (options) is set
-> This is the call out of CTEvaluateAMFICodeSignatureCMS_MaxDigestType, and is the one that sets the flags
struct ContentInfoSignedData {
int always4; // 0x0
void* someBufferFromCTParseContentInfoSignedDataArg6; // 0x8
// ?
#!/bin/bash
echo "Please make sure GPTK dmg is mounted"
read -p "Press enter to continue"
# Install GPTK
ditto /Volumes/Game\ Porting\ Toolkit-1.0/lib/ ~/Library/Application\ Support/Whisky/Libraries/Wine/lib
cd ~/Library/Application\ Support/Whisky/Libraries/Wine/lib
@boraseoksoon
boraseoksoon / fuzz.swift
Last active May 11, 2023 12:26
Swift fuzzy search in SwiftUI
This file has been truncated, but you can view the full file.
// written by https://talk.objc.io/episodes/S01E211-simple-fuzzy-matching
// credits should go to obj.io
import SwiftUI
import Cocoa
struct ContentView: View {
@State var needle: String = ""
var filtered: [(string: String, indices: [String.Index])] {
@rkevin-arch
rkevin-arch / README.md
Last active March 27, 2025 19:57
OneShot Refuge Factory Puzzle Writeup

OneShot Refuge Factory Puzzle Writeup

The problem

If you have not played OneShot yet, go do that RIGHT NOW. It's available on Steam and itch.io, and it's one of my favorite games of all time.

This puzzle appears in the Factory in the Refuge, and is a variant of the game Mastermind. You have 5 lights that you can toggle to either orange, blue, green or red. There's a correct pattern of 5 colors that you're supposed to guess. After you set each light, you can pull a lever, and it will tell you how many lights you got correct. You get 10 attempts before the puzzle resets itself. Depending on the pattern, it can be quite easy or fairly tricky to guess the right pattern.

image ![image](https://user-images.githubusercontent.c

@jam1garner
jam1garner / switch-gdb-cheatsheet.md
Last active April 15, 2025 22:44
GDB for Switch Modding Cheatsheet/Tutorial

This is a mini-tutorial of sorts for getting started with gdb on the Switch, with the target audience being people who want to mod and/or reverse games, with no prerequisite knowledge of gdb. The goal will be to walk you through some of the basic workflows needed to use a debugger on the Switch, while being brief enough for skimming for when you forget things.

If some part is unclear, your OS doesn't have install instructions, or you feel part of your workflow should be added here, feel free to comment any additions.

(If you only need a quick reference Jump to the Appendix)

Installing GDB

First off you'll need a version of GDB compatible with aarch64. This can be obtained via either a distribution of

@TheSpydog
TheSpydog / fna-wasm-instructions.md
Last active February 12, 2025 22:53
How to build your FNA game for WebAssembly

How to build your FNA game for WebAssembly

WARNING: This process is EXTREMELY experimental and not officially supported yet!

Thanks to the ongoing work on .NET WebAssembly support, it is now possible to build FNA games for the web!

If you decide to give this a try, be sure to tell us about it in the FNA Discord! I'm happy to help if you run into problems or have any further questions that are not answered here.

The Basics

@probonopd
probonopd / Wayland.md
Last active May 22, 2025 02:02
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down: