Skip to content

Instantly share code, notes, and snippets.

View DerekSelander's full-sized avatar
👠
Set your status

Derek DerekSelander

👠
Set your status
View GitHub Profile
@DerekSelander
DerekSelander / Karabiner elements, Derek's happy mini vim
Created August 10, 2017 20:04
Karabiner elements mini vim with d + , word left d + . word right
{
"title": "Vi Mode (rev 3) + Derek's mods",
"rules": [
{
"description": "Vi Mode #1 [S + H/J/K/L → Arrow Keys]",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "s",
@DerekSelander
DerekSelander / liblink
Created February 13, 2018 20:31
Look for executables/frameworks that link to that keyword... i.e. liblink . CoreData
@DerekSelander
DerekSelander / dsresign
Last active April 16, 2023 02:26
Resign iOS .app directories, expects app dir, provisioning profile, [optional] new name for iOS app
#!/bin/bash
# MIT License
#
# Copyright (c) 2018 Derek Selander (@LOLgrep)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@DerekSelander
DerekSelander / overlaydbg
Created February 25, 2018 20:36
Display UIDebuggingInformationOverlay on iOS 11 without swizzling
+ (void)load {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
int imageCount = _dyld_image_count();
const struct mach_header* UIKitHeader = nil;
for (int i = 0; i < imageCount; i++) {
if (strcmp(basename((char *)_dyld_get_image_name(i)), "UIKit") == 0) {
UIKitHeader = _dyld_get_image_header(i);
@DerekSelander
DerekSelander / LLDB_command_search.mm
Created November 6, 2018 21:08
A cleaned up and commented file of the dynamically generated code from the LLDB search.py command
//
// LLDB_command_search.mm
// Code Challenge
//
// Created by Derek Selander on 11/6/18.
// Copyright © 2018 Selander. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <objc/runtime.h>
@DerekSelander
DerekSelander / DerekDefault.idekeybindings
Last active December 11, 2018 16:57
Xcode key bindings
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Menu Key Bindings</key>
<dict>
<key>Key Bindings</key>
<array>
<dict>
<key>Action</key>
@DerekSelander
DerekSelander / BreakAfterRegex
Created January 10, 2019 19:11
Creates a regex breapoint which stops after the function execution
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import lldb
import optparse
import shlex
class BarOptions(object):
optdict = {}
@DerekSelander
DerekSelander / dancing Gandlaf
Created March 5, 2019 02:03
Ohhhh I am a horrible person, launchctl load -w com.selander.boom.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.touchsomefile</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>https://www.youtube.com/watch?v=cMHcmReOg3c</string>
@DerekSelander
DerekSelander / Going to hell for this
Created April 3, 2019 16:40
Launchd Daemon for displaying dancing Gandalf when user builds Xcode
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.selander.gandalf</string>
<key>Program</key>
<string>/usr/bin/open</string>
<key>ProgramArguments</key>
<array>
@DerekSelander
DerekSelander / omg.c
Last active September 27, 2019 15:59
Fixing Scansnap's code
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <mach/mach.h>
#include <mach/mach_vm.h>
#include <assert.h>
#include <unistd.h>