Hardware:
- Raspberry Pi 4 (4GB RAM)
- Micro SD card 32GB
- 2x Integral USB 3.1 flash drives 128GB
OS:
- Raspbian Buster
#!/usr/bin/env bash | |
### Bash Environment Setup | |
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html | |
# set -o xtrace | |
set -o errexit | |
set -o errtrace | |
set -o nounset | |
set -o pipefail |
#!/bin/bash | |
# Before running this script, make sure you have sysbench installed: | |
# sudo apt-get install sysbench | |
# | |
# This script helps you check if your Raspberry pi is correctly powered. | |
# You can read more about Raspberry pi powering issues here: https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/ | |
# If you're pi is correctly powered (stable power supply and quality cable), after running the script, you should get something like: |
# Linux | |
# add the following to "~/.gitconfig" file | |
[merge] | |
tool = intellij | |
[mergetool "intellij"] | |
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") | |
trustExitCode = true | |
[diff] |
## Open GitKraken using the current repo directory. | |
## For when you want a prettier view of your current repo, | |
## but prefer staying in the cli for most things. | |
## This will break if GitKraken ever removes the -p flag. | |
## If you're not using OSX, the path is definitely different. | |
kraken () { | |
~/Applications/GitKraken.app/Contents/MacOS/GitKraken -p $(pwd) | |
} |
The merge tool that ships with JetBrain's IntelliJ IDEA or WebStorm is really awesome and way better than FileMerge
. It is quite simple to configure SourceTree to use it as the default mergetool:
Diff
tabCustom
both as Visual Diff Tool
and as Merge Tool
/Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea diff
// See: http://stackoverflow.com/questions/11531353/viewing-nsdata-contents-in-xcode#25097265 | |
po String(data: data, encoding: .utf8) | |
// Objective-C equivalent. | |
// See: http://stackoverflow.com/questions/11531353/viewing-nsdata-contents-in-xcode#19626815 | |
// p (char *)[buffer bytes] |
#!/usr/bin/env bash | |
if [ -n "$1" ] | |
then | |
if grep "ide.mac.useNativeClipboard=" "$1"/Contents/bin/idea.properties > /dev/null | |
then | |
if grep "ide.mac.useNativeClipboard=false" "$1"/Contents/bin/idea.properties > /dev/null | |
then | |
echo "ide.mac.useNativeClipboard=false found -> change to true" |
#!/bin/sh | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
# Step 2. Copy the framework structure to the universal folder |