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 <Foundation/Foundation.h> | |
#import <CoreFoundation/CoreFoundation.h> | |
# pragma mark Daemon Protocol | |
@protocol DaemonProtocol | |
- (void)performWork; | |
@end | |
# pragma mark MyTask Object Conforms to Protocol |
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 bash | |
set -e | |
function main { | |
bitrise_cli_ver="$1" | |
if [ -z "${bitrise_cli_ver}" ] ; then | |
echo " [!] No version specified, required! Run this script as: $ bash install-bitrise-cli.sh x.x.x" | |
exit 1 | |
fi | |
echo "Installing Bitrise CLI v${bitrise_cli_ver} ..." |
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
<!-- Add the following lines to theme's html code right before </head> --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script> | |
<!-- | |
Usage: just add <div class="gist">[gist URL]</div> | |
Example: <div class="gist">https://gist.github.com/1395926</div> | |
--> |
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 | |
set -ex | |
#install bluepill | |
git clone git@github.com:linkedin/bluepill.git "$BITRISE_SOURCE_DIR/bluepill" | |
#build bluepill | |
cd "$BITRISE_SOURCE_DIR/bluepill" | |
./scripts/bluepill.sh build |
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
# | |
# requires 'pwgen', can be installed with brew | |
# | |
# add this to your .bash_profile, .profile or .bashrc for quick terminal access | |
# input: the length of the password | |
# usage example: gensecpsw 16 | |
# example result: XjQ%uWQ.&7-T4@`( | |
# | |
gensecpsw() { | |
printf '%s' $(pwgen -B -c -s -n -y $1 1) |pbcopy; echo "Has been copied to clipboard" |
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
# | |
# Paste this into a new "Run Script" Build Phase (as described here: http://stackoverflow.com/a/15483906/974381) | |
# | |
# Tip: drag-and-drop your new Run Script to run before the "Compile Sources" Phase! | |
# | |
# Source: http://stackoverflow.com/a/15483906/974381 | |
# | |
# How to get version numbers in code? | |
# NSString *buildString = infoDictionary[(NSString*)kCFBundleVersionKey]; | |
# NSString *versionString = infoDictionary[@"CFBundleShortVersionString"]; |
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
# WARNING! The following is not as safe as I originally thought and I'm not sure yet the right way to do this. | |
# See https://unix.stackexchange.com/questions/383541/how-to-save-restore-all-shell-options-including-errexit | |
enable_safety() { | |
BITRISE_CLI_PREVIOUS_SHELL_OPTIONS=$(set +o) | |
set -o nounset | |
set -o errexit | |
set -o pipefail | |
} |
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 will add lauchd to the list of allowed processes for accessibility access | |
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceAccessibility','/sbin/osascript',1,1,1,NULL)" | |
# This outputs the rows in the TCC database | |
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db 'select * from access' | |
echo "Restart is required for these changes to take effect" |
NewerOlder