Skip to content

Instantly share code, notes, and snippets.

View yellinben's full-sized avatar

Ben Yellin yellinben

View GitHub Profile
@mattmc3
mattmc3 / split.zsh.md
Last active March 31, 2024 15:34
ZSH - split string into array

Example splitting string on slash character in ZSH.

$ str=part1/part2/part3
$ parts=(${(@s:/:)str})
$ echo $parts
part1 part2 part3
$ echo ${#parts[@]}
3
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active June 25, 2024 20:13
Hyperlinks in Terminal Emulators
@thomasfinch
thomasfinch / buildFishiOS.sh
Created March 23, 2017 06:20
Bash script to build the fish shell for a jailbroken iOS device
#!/bin/bash
# Before running this script:
# Find AC_CHECK_FILES([/proc/self/stat]) in configure.ac and comment it out
# cd into the fish source directory
FLAGS="-stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -target armv7-apple-darwin16 -miphoneos-version-min=8.0.0"
PREFIX=$(pwd)"/deb"
# Build fish
@steventroughtonsmith
steventroughtonsmith / main.m
Created March 24, 2016 08:08
Load Mach-O executable at runtime and execute its entry point
void callEntryPointOfImage(char *path, int argc, char **argv)
{
void *handle;
int (*binary_main)(int binary_argc, char **binary_argv);
char *error;
int err = 0;
printf("Loading %s…\n", path);
handle = dlopen (path, RTLD_LAZY);

#Loading Tweaks in the Simulator

With the latest updates to the simulator, this turns out to be pretty simple:

You need to be using kirb/theos

In order not to require MobileSubstrate to be loaded and your tweak to be compiled for i386/x86_64, add

In your makefile:

#!/usr/bin/env python
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>"
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf"
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/"
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/"
import leveldb
import sys
import re
@selaromi
selaromi / make-flashlight-work-on.yosemite.md
Last active July 25, 2023 19:21
Steps to make Flashlight work on 10.10.4 (doesn't work for El Capitan)

Make Flashlight work on 10.10.4

  1. Install SIMBL http://culater.net/software/SIMBL/SIMBL.php
  2. Copy SpotlightSIMBL.bundle to /Library/Application Support/SIMBL/Plugins/ (a)
  3. Copy Flashlight.osax to ~/Library/ScriptingAdditions/ (b)
  4. Disable Flashlight
  5. Enable Flashlight
  6. Open Script Editor on your Mac (look for "Script Editor In Spotlight") and paste the following code (don't change Snow Leopard for Yosemite)
tell application "Spotlight" to inject SIMBL into Snow Leopard
@rpetrich
rpetrich / Rename Hook Procedures.py
Created July 21, 2015 20:34
Annotate hook procedure names in Hopper by parsing Objective C runtime calls
print "--"
print "Renaming Hooks for Current Procedure..."
print "Message from rpetrich: Please use this for good and not evil"
print "--"
doc = Document.getCurrentDocument()
def procedure_end(seg, proc):
addr = proc.getEntryPoint()
currentIndex = seg.getProcedureIndexAtAddress(addr)
@norio-nomura
norio-nomura / gist:f4346e9cb9db0a411779
Last active May 28, 2023 06:06
Note: About injection mechanism of EasySIMBL extended from SIMBL-0.9.9

Note: About injection mechanism of EasySIMBL extended from SIMBL-0.9.9

Inject into processes launched before launching SIMBL Agent.app

Since EasySIMBL-1.0

Application resume on login happen before launching original SIMBL Agent.app. On launching, EasySIMBL's SIMBL Agent.app find target apps from already launched apps, and inject into it.

Inject into Background/Agent applications