Skip to content

Instantly share code, notes, and snippets.

View feosuna1's full-sized avatar

Enrique Osuna feosuna1

  • Stuttgart, Germany
  • 03:35 (UTC +02:00)
View GitHub Profile
@feosuna1
feosuna1 / xo
Created November 7, 2022 15:39
Command line script for opening Xcode in the current working directory
#!/usr/bin/env sh
XCODE_APP=$(xcode-select -p)
XCODE_APP="${XCODE_APP%%.app*}.app"
if [[ -z "${XCODE_APP// }" ]]; then
echo "Unable to find path for Xcode installation. Install Xcode."
exit 1
fi
echo "Opening Xcode..."
@feosuna1
feosuna1 / Breakpoints_v2.xcbkptlist
Last active May 26, 2016 14:47
My Xcode break points
<?xml version="1.0" encoding="UTF-8"?>
<!--
To install:
$ cd ~/Library/Developer/Xcode/UserData/xcdebugger && curl https://gist.githubusercontent.com/feosuna1/05593f8a1dfb645dac0cd66070ebf460/raw -o Breakpoints_v2.xcbkptlist
-->
<Bucket
type = "2"
@feosuna1
feosuna1 / gist:da605ab83b79ad76d452
Created January 2, 2016 09:47 — forked from krzysztofzablocki/gist:4396302
Set symbol breakpoint on objc_msgSend then setup this debug command to log all methods called in iOS Simulator. If you want to do device debugging change esp+4 register to r0, esp+8 to r1 Found long ago somewhere on stackoverflow.
expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) )
expr -- (void)printf("[%s %s]\n",(char *) object_getClassName(*(long*)($rdi)), (char *)($rsi))
@feosuna1
feosuna1 / bash_profile.bash
Created August 2, 2012 00:41
My Bash Profile
shopt -s histappend
PROMPT_COMMAND=prompt_command
prompt_command ()
{
local NONE="\[\033[0m\]" # unsets color to term's fg color
# regular colors
local FG_BLACK="\[\033[0;30m\]"
local FG_RED="\[\033[0;31m\]"
@feosuna1
feosuna1 / git-clean-whitespace
Last active November 7, 2022 15:45
Git hook for cleaning white spaces
#!/usr/bin/env bash
#==============================================================================#
# Remove whitespace errors from text files.
#
# If a whitespace error is found, it notifies the user and fixes the errors.
# This script will only run if the `git config` variable `apply.whitespace` is
# set to fix. You can use `git config` to make this change, use the `--global`
# to apply these changes globally to all your git repos:
# ```
# $ git config apply.whitespace fix