- Download the docset index XML.
- Find the docset you want (there are some with URL https://apple.com/none.dmg; ignore them - you will find them again further down the file with a working URL).
- Download the dmg. It's probably around a gigabyte or so.
- "Install" the .pkg file somewhere on your disk. If you don't trust the installer, do it manually:
- Find the largest file, named Payload, and extract it using The Unarchiver.
- This creates a new, even larger file, probably named Payload-1.
- Extract Payload-1 using The Unarchiver.
- After many minutes of extracting, we have our .docset file.
image: golang:1.7 | |
stages: | |
- build | |
- test | |
before_script: | |
- go get github.com/tools/godep | |
- cp -r /builds/user /go/src/github.com/user/ | |
- cd /go/src/github.com/user/repo |
import java.io._ | |
import java.util.Base64 | |
import java.nio.charset.StandardCharsets.UTF_8 | |
def serialise(value: Any): String = { | |
val stream: ByteArrayOutputStream = new ByteArrayOutputStream() | |
val oos = new ObjectOutputStream(stream) | |
oos.writeObject(value) | |
oos.close | |
new String( |
# Docker-in-Docker Gitlab runners setup taken from: | |
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca | |
dind: | |
restart: always | |
privileged: true | |
volumes: | |
- /var/lib/docker | |
image: docker:17.09.0-ce-dind | |
command: | |
- --storage-driver=overlay2 |
// UICollectionView Objective-C example | |
- (void)viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
NSIndexPath *selectedIndexPath = [[self.collectionView indexPathsForSelectedItems] firstObject]; | |
if (selectedIndexPath != nil) { | |
id<UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator; | |
if (coordinator != nil) { | |
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) { |
# This is clicking "Allow" in System Preferences "Security & Privacy" screen | |
# when you're on Screen Sharing. Otherwise it doesn't work. | |
# To fix: | |
# - Put "Security & Privacy" window in the top left screen | |
# - open a Terminal on a side | |
# - save click.oscript | |
# - Run: osascript click.oscript | |
# | |
# The mouse click you send should hit "Allow" button. You may need to move the window a little bit. | |
# Script originally from: https://discussions.apple.com/thread/3708948 |
version: '2.1' | |
volumes: | |
files: | |
driver: local | |
mysql: | |
driver: local | |
backup: | |
driver: local | |
redis: |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
-
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
-
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
import UIKit | |
class MyTextLabel: UIView { | |
var textLayer = CATextLayer() | |
var textStorage: String = "" { | |
didSet { | |
textLayer.string = textStorage | |
} | |
} |
sudo gitlab-runner register \ | |
--non-interactive \ | |
--url "https://gitlab.local/" \ | |
--registration-token "xJWfniGqvSeVyKc3vaQx" \ | |
--executor "docker" \ | |
--docker-image ubuntu:16.04 \ | |
--description "docker-runner" \ | |
--tag-list "docker,aws" \ | |
--run-untagged \ | |
--docker-extra-hosts "gitlab.local:10.0.1.15" \ |