a
enter into insert mode after the character your cursor is on
A
enter into insert mode at the end of the current line
// Thanks to @MonsieurDart for the idea :) | |
func scroll(collectionView:XCUIElement, toFindCellWithId identifier:String) -> XCUIElement? { | |
guard collectionView.elementType == .collectionView else { | |
fatalError("XCUIElement is not a collectionView.") | |
} | |
var reachedTheEnd = false | |
var allVisibleElements = [String]() | |
while !reachedTheEnd { |
#!/bin/sh | |
# Create a RAM disk with same perms as mountpoint | |
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions | |
# Usage: sudo ./xcode_ramdisk.sh start | |
USERNAME=$(logname) | |
DEV_CACHES_DIR="/Users/$USERNAME/Library/Developer/Xcode/DerivedData" | |
DEV_CACHES_SHADOW_DIR="/Users/$USERNAME/Library/Developer/Xcode/DerivedData_shadow" |
defaults write xcodebuild PBXNumberOfParallelBuildSubtasks 4 | |
defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4 | |
defaults write com.apple.dt.Xcode PBXNumberOfParallelBuildSubtasks 4 | |
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4 | |
defaults write com.apple.dt.Xcode ExplainWhyBuildCommandsAreRun -bool true | |
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool true |
#!/bin/sh | |
wget http://ipinfo.io/ip -qO - |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2015-09-24-raspbian-jessie.img
) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config
to:
Byobu Commands | |
============== | |
byobu Screen manager | |
Level 0 Commands (Quick Start) | |
------------------------------ | |
<F2> Create a new window |
func measure(title: String, block: (finish:()-> Void) -> Void) { | |
let startTime = CFAbsoluteTimeGetCurrent() | |
block { | |
let timeElapsed = CFAbsoluteTimeGetCurrent() - startTime | |
print("\(title):: Time: \(timeElapsed)") | |
} | |
} |
#! /usr/bin/env sh | |
# assumption: Xcode is always installed at /Applications | |
# STEPS: | |
# use plistbuddy to read $INFOPLIST_FILE::DVTPlugInCompatibilityUUIDs array | |
# get new DVTPlugInCompatibilityUUID [ defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID ] | |
# check new DVTPlugInCompatibilityUUID already in the array | |
# YES: end | |
# NO: use plistbuddy to write the new DVTPlugInCompatibilityUUID into the array and write out to file |