Skip to content

Instantly share code, notes, and snippets.

View ifarbod's full-sized avatar
🙃
PAGE_FAULT_IN_NONPAGED_AREA

iFarbod ifarbod

🙃
PAGE_FAULT_IN_NONPAGED_AREA
View GitHub Profile
@velzie
velzie / manifest-v2-chrome.md
Last active November 27, 2025 19:57
How to keep using adblockers on chrome and chromium

NOTE

by the time you're reading this, this probably no longer works since the policy has been removed. I reccomend you to check out https://github.com/r58Playz/uBlock-mv3 instead

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

@nicolas17
nicolas17 / yellow.asm
Last active November 27, 2025 14:03
hello-world iOS app
.global _main
.extern _putchar
.align 4
_main:
; prolog; save fp,lr,x19
stp x29, x30, [sp, #-0x20]!
str x19, [sp, #0x10]
@lpcdma
lpcdma / launch.json
Created November 6, 2019 06:46
codelldb android
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "attach",
"name": "android_attach",
"pid": "13841",
"initCommands": [
"platform select remote-android",
@kajott
kajott / vaapi_egl_interop_example.c
Last active October 22, 2025 06:31
example code for minimal-overhead hardware-accelerated video decoding and display on Linux using VA-API/EGL interoperability
#if 0 // self-compiling code: chmod +x this file and run it like a script
BINARY=vaapi_egl_interop_example
gcc -std=c99 -Wall -Wextra -pedantic -Werror -g -fsanitize=address -o $BINARY $0 \
`pkg-config libavcodec libavformat libavutil libva gl egl libdrm --cflags --libs` \
-lX11 -lva-x11 -lva-drm || exit 1
test "$1" = "--compile-only" && exit 0
exec env ASAN_OPTIONS=fast_unwind_on_malloc=0 ./$BINARY $*
#endif /*
Minimal example application for hardware video decoding on Linux and display
@icecr4ck
icecr4ck / idapython_cheatsheet.md
Last active November 20, 2025 13:52
Cheatsheet for IDAPython
@badlands
badlands / UIDeviceExtensions.swift
Last active May 24, 2019 12:05
UIDeviceExtension: hasNotch
import Foundation
import UIKit
extension UIDevice {
/// Returns 'true' if the current device has a notch
var hasNotch: Bool {
if #available(iOS 11.0, *) {
// Case 1: Portrait && top safe area inset >= 44
let case1 = !UIDevice.current.orientation.isLandscape && (UIApplication.shared.keyWindow?.safeAreaInsets.top ?? 0) >= 44
@Ademking
Ademking / readme.md
Last active June 24, 2025 12:43
💚 Android : How to record events and play them using ADB SHELL

1) Know the event name of touchpad :

Run :

adb shell getevent -pl

Search for : "ABS_MT_TRACKING_ID" - example :

@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active December 3, 2025 17:13
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@NeroBurner
NeroBurner / main.cpp
Last active August 13, 2019 13:36
rapidjson::Pointer not working in loop
// external libraries
#include "rapidjson/document.h"
#include "rapidjson/pointer.h"
// standard libraries
#include <iostream>
#include <string>
#include <vector>
void parse_json_int(rapidjson::Document &json, const std::string &pointer, int &target)
@CookiePLMonster
CookiePLMonster / sincos.cpp
Last active January 7, 2018 01:21
SSE2 sincos VS15.5.2 issue
#include <iostream>
#include <cmath>
// Compile in Release, x86
// /arch:IA32, /fp:fast
// Resulting code contains SSE opcodes and calls ___libm_sse2_sincosf_
int main()
{
float val = 0.0f;
std::cin >> val;