Skip to content

Instantly share code, notes, and snippets.

View BomberFish's full-sized avatar
☹️
school

Hariz BomberFish

☹️
school
View GitHub Profile
@velzie
velzie / manifest-v2-chrome.md
Last active June 26, 2024 04:02
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 May 17, 2024 14:49
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])] {
@probonopd
probonopd / Wayland.md
Last active June 29, 2024 15:38
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.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@kymckay
kymckay / perlin.lua
Last active March 11, 2024 22:51
Perlin Noise in Lua
--[[
Implemented as described here:
http://flafla2.github.io/2014/08/09/perlinnoise.html
]]--
perlin = {}
perlin.p = {}
-- Hash lookup table as defined by Ken Perlin
-- This is a randomly arranged array of all numbers from 0-255 inclusive