Skip to content

Instantly share code, notes, and snippets.

@shitchell
shitchell / git-user-stats
Last active October 18, 2025 11:31
Show user stats in a git repo
#!/bin/bash
#
# Show user stats (commits, files modified, insertions, deletions, and total
# lines modified) for a repo
git_log_opts=( "$@" )
git log "${git_log_opts[@]}" --format='author: %ae' --numstat \
| tr '[A-Z]' '[a-z]' \
| grep -v '^$' \
@0cyn
0cyn / dec.py
Last active November 20, 2022 02:26
convert ida decompiler output into something a bit closer to proper objc syntax
code = """your IDA decompiler output here"""
lines = code.split('\n')
import re
from enum import Enum
mfp1 = re.compile('(\S*?) \S*? ([-+])\[(\S*) ([^\]]*)]\(([^\)]*)\)')
depth1_objc_call = re.compile('([-+])\[(\S*) ([^\]]*)]\(([^\)]*)\)')
@bonzini
bonzini / mbox_split.py
Last active August 24, 2025 21:19
Split a mailbox into separate patch files, stripping the transfer encoding and minimizing the headers along the way.
#! /usr/bin/env python3
# mbox_split.py
#
# Split a mailbox into separate patch files, stripping the transfer encoding
# and minimizing the headers along the way.
#
# Written by Paolo Bonzini <pbonzini@redhat.com>
import argparse
@SergLam
SergLam / Steps.swift
Last active April 17, 2025 00:41
XCode quick install / update
// Original video tutorial
// https://www.youtube.com/watch?v=6iSuc2vxT8g
// 0. Install a Homebrew
// https://brew.sh/
// 1. Install Ruby to your Mac
// brew install ruby
// 2. Install aria2 tool
@PsychoTea
PsychoTea / PanicParser.py
Last active December 20, 2025 15:31
A collection of useful iOS-related scripts
import sys
import json
import re
kslide = 0x0
if len(sys.argv) < 2:
print("Usage: PanicParser.py [file path]")
exit()
@interface _UIBackdropView : UIView
-(id)initWithStyle:(long long)style;
-(long long)style;
@end
@interface SBFloatingDockPlatterView
@property (nonatomic, retain) _UIBackdropView * backgroundView;
@end
@interface SBFolderBackgroundView : UIView
@uroboro
uroboro / stringSwitch.m
Last active November 20, 2022 02:27
Objective-C switch statement with strings.
#include <stdio.h>
#import <Foundation/Foundation.h>
int main(int argc, char **argv) {
NSArray * options = @[
@"-h",
@"--help",
@"--get",
@"--set",
];
@saoudrizwan
saoudrizwan / TapticEngineHapticSignals.swift
Last active June 9, 2024 02:36
Example of using Taptic Engine haptic signals on iOS
import AudioToolbox.AudioServices
// 'Peek' feedback (weak boom)
let peek = SystemSoundID(1519)
AudioServicesPlaySystemSound(peek)
// 'Pop' feedback (strong boom)
let pop = SystemSoundID(1520)
AudioServicesPlaySystemSound(pop)