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
//Install Macports. | |
//Install aircrack-ng: | |
sudo port install aircrack-ng | |
//Install the latest Xcode, with the Command Line Tools. | |
//Create the following symlink: | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
//Figure out which channel you need to sniff: | |
sudo airport -s | |
sudo airport en1 sniff [CHANNEL] |
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
view.addFallbackConstraints(item: labelB, attribute: .Top, relatedBy: .Equal, fallbackArrayItems:[topImageView], attribute: .Bottom, multiplier: 1, constant: 20, startPriority:110) | |
view.addFallbackConstraints(item: labelC, attribute: .Top, relatedBy: .Equal, fallbackArrayItems:[labelA,topImageView], attribute: .Bottom, multiplier: 1, constant: 20, startPriority:105) | |
view.addFallbackConstraints(item: labelD, attribute: .Top, relatedBy: .Equal, fallbackArrayItems:[labelB,labelA,topImageView], attribute: .Bottom, multiplier: 1, constant: 20, startPriority:100) | |
extension UIView { | |
func addFallbackConstraints(item view1: AnyObject, attribute attr1: NSLayoutAttribute, relatedBy relation: NSLayoutRelation, fallbackArrayItems: [AnyObject], attribute attr2: NSLayoutAttribute, multiplier: CGFloat = 1, constant c: CGFloat, startPriority: UILayoutPriority) -> UILayoutPriority { | |
var priorityDecrementer = startPriority |