- 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.
This file contains hidden or 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
# 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 |
This file contains hidden or 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
// 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 file contains hidden or 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
# 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 |
This file contains hidden or 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 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( |
This file contains hidden or 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
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 |
This file contains hidden or 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> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
const long count = 10000000; | |
const char *str1 = "hellohello"; //fits in a tagged pointer | |
const char *str2 = "hellohelQo"; //at this character count, can only fit in a tagged pointer by using <8 bits per character, which requires dropping less frequently used chars like 'Q' | |
const char *str3 = "Northern Sami"; //this string is encountered frequently enough that it's baked into a perfect hash table in CoreFoundation | |
const char *str4 = "hellohellü"; //this string can't be tagged *and* can't be stored using an ASCII backing store | |
NSDate *start = [NSDate date]; |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"log" | |
"strconv" | |
"github.com/miekg/dns" | |
) |
This file contains hidden or 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
total time: 6.2 seconds (100.0%) | |
total images loaded: 347 | |
total segments mapped: 1278, into 78370 pages with 7272 pages pre-fetched | |
total images loading time: 2.2 seconds (36.4%) | |
total dtrace DOF registration time: 0.29 milliseconds (0.0%) | |
total rebase fixups: 2,318,756 | |
total rebase fixups time: 158.44 milliseconds (2.5%) | |
total binding fixups: 284,875 | |
total binding fixups time: 113.78 milliseconds (1.8%) | |
total weak binding fixups time: 2.00 milliseconds (0.0%) |
This file contains hidden or 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
// | |
// SpinlockTestTests.swift | |
// SpinlockTestTests | |
// | |
// Created by Peter Steinberger on 04/10/2016. | |
// Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
// | |
import XCTest |