Skip to content

Instantly share code, notes, and snippets.

View viktorbenei's full-sized avatar

Viktor Benei viktorbenei

  • Bitrise Ltd (CTO & Cofounder)
  • Hungary
View GitHub Profile
@viktorbenei
viktorbenei / android-emulator-google-api.md
Created March 7, 2016 21:20
Android Emulator with Google APIs

Creating an AVD image with Google APIs is a bit more complex than just having the packages available (which we do).

We just tested with a new project and this should work - delete the Create Android Emulator step and replace it with a Script step:

#!/bin/bash
set -e
set -x

echo y | android update sdk --no-ui --all --filter addon-google_apis-google-22
@viktorbenei
viktorbenei / codesign-scan.sh
Last active December 22, 2015 10:29
Code Signing scan, based on the output of "xcodebuild .. clean archive"
#!/bin/bash
set -x
set -e
# use either the -project option, or the -workspace option but not both ;)
xcodebuild -project "YOUR.xcodeproj" OR -workspace "YOUR.xcworkspace" -scheme "a Shared scheme" clean archive | grep -i -e 'Signing Identity' -e 'Provisioning Profile' -e ' ('
@viktorbenei
viktorbenei / step.sh
Created December 4, 2015 14:41
Offset the Bitrise.io $BITRISE_BUILD_NUMBER
#!/bin/bash
set -e
if [ -z "$BITRISE_BUILD_NUMBER" ] ; then
echo " [!] BITRISE_BUILD_NUMBER not provided"
exit 1
fi
echo "=> Original BITRISE_BUILD_NUMBER: $BITRISE_BUILD_NUMBER"
set -x
@viktorbenei
viktorbenei / script_content.sh
Last active October 13, 2021 15:35
List available shared Schemes in an Xcode Project/Workspace file
#!/bin/bash
echo "=== List of available, **shared** Schemes ==="
set -x
# if you use a Workspace (.xcworkspace) file
xcodebuild -workspace $BITRISE_PROJECT_PATH -list
# or if you use a Project file (.xcodeproj) instead
xcodebuild -project $BITRISE_PROJECT_PATH -list
set +x
echo "============================================="
#!/bin/bash
#
# Unlock the keychain, using the Bitrise.io Keychain password environment
#
keychain_path="$HOME/Library/Keychains/login.keychain"
keychain_password="$BITRISE_KEYCHAIN_PASSWORD"
set -e
#!/bin/bash
set -e
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${THIS_SCRIPT_DIR}/.."
# Check if there's something uncommitted (don't release if there are files
# not yet committed)
set +e
#!/bin/bash
exit 1
@viktorbenei
viktorbenei / add_launchd_to_tcc.sh
Last active August 29, 2015 14:27 — forked from mtauraso/add_launchd_to_tcc.sh
TCC Database Script
#!/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"
@viktorbenei
viktorbenei / .bash_profile
Created January 19, 2015 10:23
OS X Terminal (coloring) improvements
# add these to ~/.bash_profile or another profile which is loaded
# from ~/.bash_profile (on OS X)
# source: http://osxdaily.com/2013/02/05/improve-terminal-appearance-mac-os-x/
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# better default 'ls'
alias ls='ls -GFh'
@viktorbenei
viktorbenei / .gitignore
Created January 17, 2015 08:32
Simple (minimal) Xcode .gitignore
# Mac OS X
*.DS_Store
# Xcode
xcuserdata/