This file contains 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
#!/bin/bash | |
# Things you should know: | |
# 1. I'm a terrible bash programmer. | |
# 2. Call with sudo. | |
# 3. Pass in the url of the swift .tar.gz release from https://www.swift.org/download/ . | |
# 4. It checks for an existing file of the same name, and will skip the download if it already exists. | |
# 5. This will install the Swift directory under /opt/swift-x.y.z... and symlink that to /opt/swift . | |
# 6. Put /opt/swift/usr/bin in your path and you can easily upgrade Swift to a new release with this script. | |
# export PATH=/opt/swift/usr/bin:"${PATH}" |
This file contains 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
@implementation NSTableView (Reordering) | |
- (void) moveRowsWithOldObjects:(NSArray*)oldObjects newObjects:(NSArray*)newObjects | |
{ | |
NSMutableArray* oldSortedArray = [oldObjects mutableCopy]; | |
NSArray* newSortedArray = newObjects; | |
[self beginUpdates]; | |