This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script downlaods and builds the iOS and Mac openSSL libraries with Bitcode enabled | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
# Peter Steinberger, PSPDFKit GmbH, @steipete. | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Bucket | |
type = "2" | |
version = "2.0"> | |
<Breakpoints> | |
<!-- All Exceptions --> | |
<BreakpointProxy | |
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
<BreakpointContent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lmutracker.mm -- Provides lux measurement using MacBook Ambient Light Sensor | |
// | |
// clang -o lmutracker lmutracker.mm -framework IOKit -framework CoreFoundation | |
// | |
// Adaptation of code originally posted at https://bugzilla.mozilla.org/show_bug.cgi?id=793728 | |
// by Reuben Morais. Modified by Ken Keiter <[email protected]> to output a single *lux* value | |
// and exit, rather than repeating measurements on the sensor's arbitrary scale. | |
#include <mach/mach.h> | |
#include <math.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.xcode_ramdisk.agent</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>xcode_ramdisk.sh</string> | |
<string>start</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now and then I need to manually symbolicate an Xcode crash report. Xcode can often do this, but not always. Here are steps that are specifically for a Watch Extension, but can be easily applied to just about anything. | |
You need the Watch Extension's dSYM from the archive created when you submitted the app. The general form: | |
$ symbolicatecrash report.crash app.dSYM | |
or more specifically, for a WatchKit Extension: | |
$ export DEVELOPER_DIR=`xcode-select --print-path` | |
$ /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash ~/Desktop/CrashLog1.crash ~/Desktop/yourApp.xcarchive/dSYMs/yourApp\ WatchKit\ Extension.appex.dSYM > ~/Desktop/CrashLog1Symbolicated.crash | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import path | |
export PATH=${PATH}:/usr/local/bin | |
#import what we have in bash_profile | |
source ~/.bash_profile | |
#check for oclint | |
hash oclint &> /dev/null | |
if [ $? -eq 1 ]; then | |
echo >&2 "oclint not found, analyzing stopped" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -w | |
class String | |
def starts_with?(prefix) | |
prefix.respond_to?(:to_str) && self[0, prefix.length] == prefix | |
end | |
end | |
HEADER_REGEX = /^#import\s+["<](.*)[">]/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.olark.com/spw/2011/08/you-can-list-a-directory-with-8-million-files-but-not-with-ls/ | |
#define _GNU_SOURCE | |
#include <dirent.h> /* Defines DT_* constants */ | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <sys/syscall.h> |