Skip to content

Instantly share code, notes, and snippets.

@Mabdelwanis
Mabdelwanis / PSListController+JSON.h
Created November 29, 2025 02:28 — forked from donato-fiore/PSListController+JSON.h
PSListController extension to load JSON files.
#include <Preferences/PSListController.h>
@interface PSListController (JSON)
- (NSMutableArray *)loadSpecifiersFromJSONName:(NSString *)name target:(PSListController *)target;
- (NSMutableArray *)loadSpecifiersFromJSONName:(NSString *)name target:(PSListController *)target bundle:(NSBundle *)bundle;
@end
@Mabdelwanis
Mabdelwanis / swift-hook.md
Created November 28, 2025 23:11 — forked from leptos-null/swift-hook.md
Hooking Swift functions

This article aims to describe how to hook Swift functions.

Thanks to help from @NightwindDev for discussion and testing.

Overall, the idea is simple: Write our own Swift code that will have the same calling convention as the target code, then get a pointer to our own code and the target code, and call MSHookFunction with these values.

Code

@Mabdelwanis
Mabdelwanis / common-git-cmds.md
Created November 28, 2025 23:10 — forked from L1ghtmann/common-git-cmds.md
Common git commands I forget

Git Commands

Note: SSH url format

[email protected]:name/repo.git

Add contributor remote branch for edits

  1. git remote add contributor https://github.com/name/repo.git
  2. git fetch contributor
  3. git checkout -b update contributor/master
  4. git push contributor update:master
@Mabdelwanis
Mabdelwanis / info.md
Created November 28, 2025 23:10 — forked from L1ghtmann/info.md
Access WSL2 externally
netsh interface portproxy add v4tov4 listenport=4000 listenaddress=0.0.0.0 connectport=4000 connectaddress=$(wsl.exe hostname -I)

Purpose: forwards all incoming network traffic (0.0.0.0) on port 4000 to $(wsl.exe hostname -I) at the same port

  • view
netsh interface portproxy show all
  • delete
@Mabdelwanis
Mabdelwanis / VolumePressDetect.m
Created November 27, 2025 20:27 — forked from sergealagon/VolumePressDetect.m
Detect volume button press on jailed iOS device
/* MIT License */
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import <objc/message.h>
#import <os/log.h>
/* this is a way to detect volume button press on jailed iOS device */
/* if you cannot use private frameworks, you could probably look into MPVolumeView*/
/* but i never tried it myself. you may also look into AVAudioSession's outputVolume*/
@Mabdelwanis
Mabdelwanis / tts-broadcaster.md
Created October 10, 2025 21:09 — forked from douxxtech/tts-broadcaster.md
A simple python script to broadcast text (TTS) on FM radio with a raspberry pi !

TTS Broadcaster

A simple tool allowing you to broadcast TTS (text to speech) on your local FM radio. Requires a raspberry pi.
(Uses douxxtech/piwave

Setup

Run these commands to setup your environment and install the nessesarry modules:

curl -sL https://setup.piwave.xyz/ | sudo bash
python3 -m venv ~/piwave-env
@Mabdelwanis
Mabdelwanis / can-id-png.md
Created November 24, 2024 21:26 — forked from agmangas/can-id-png.md
Relationship between CAN IDs and J1939 PGNs

CAN IDs & J1939 PGNs

Global PGN Example

Original CAN ID:

1    8    F    0    0    1    0    B
0001 1000 1111 0000 0000 0001 0000 1011
I faced this issue with the following environment:
iPhoneX iOS 16.5.1, palera1n rootless jb, ellekit 1.0
@Mabdelwanis
Mabdelwanis / sendPOSTRequestWithUR.m
Created December 17, 2023 22:58 — forked from wptechprodigy/sendPOSTRequestWithUR.m
POST request to a URL using Objective-C
- (void)sendPOSTRequestWithURL:(NSURL *)url parameters:(NSDictionary *)parameters completionHandler:(void (^)(NSData *, NSURLResponse *, NSError *))completionHandler {
// Create a mutable URL request
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
// Set the request method to POST
[request setHTTPMethod:@"POST"];
// Set the request body with the parameters
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
[request setHTTPBody:postData];

UITableView Simple Template

  • Small Sample
import UIKit

class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {