Skip to content

Instantly share code, notes, and snippets.

View zcutlip's full-sized avatar

Zachary Cutlip zcutlip

View GitHub Profile
@zcutlip
zcutlip / lldb-hand-rolled-headers.md
Last active January 25, 2021 13:38
Importing Hand-Rolled C Header Files in LLDB

Importing Hand-Rolled C Header Files in LLDB

Scenario

  • We're debugging a dylib, libhello.dylib
  • The dylib is linked from hello
  • The exported function is helloworld()
  • We do not have source, but have reversed a struct from the library and created a hand-crafted header file

Header File

@zcutlip
zcutlip / adding-a-vmware-static-dhcp.md
Created November 8, 2019 23:58
Automatically adding a static DHCP reservation to VMWare's dhcpd.conf and to /etc/hosts
(0) $ python3 -m vmware_static_dhcp.vmware_static_dhcp --help
usage: vmware_static_dhcp.py [-h] --hw-addr HW_ADDR --ip-addr IP_ADDR
                             --hostname HOSTNAME
                             updated_hosts_path updated_dhcpd_conf_path

positional arguments:
  updated_hosts_path    Path to updated hosts file
  updated_dhcpd_conf_path
                        Path to update dhcpd.conf file.
@zcutlip
zcutlip / deletebranch.sh
Last active October 28, 2019 00:09
(Relatively) safely delete a git branch from local and remote
#!/bin/sh
# File: deletebranch.sh
# Author: Zachary Cutlip <uid000@gmail.com>
# Purpose: (Relatively) safely delete specified branch from local and origin in one pass
quit(){
if [ $# -gt 1 ];
then
echo $1