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
extension NSUserDefaults { | |
func colorForKey(key: String) -> UIColor? { | |
var color: UIColor? | |
if let colorData = dataForKey(key) { | |
color = NSKeyedUnarchiver.unarchiveObjectWithData(colorData) as? UIColor | |
} | |
return color | |
} |
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/tcsh | |
# Grab user information. | |
echo "PrivateInternetAccess OpenVPN Setup:" | |
echo " https://www.privateinternetaccess.com/pages/client-control-panel" | |
echo " -> PPTP/L2TP/SOCKS Username and Password" | |
echo -n "User: " | |
set user = $< | |
echo -n "Pass: " | |
set pass = $< |
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
import Foundation | |
struct Regex { | |
var pattern: String { | |
didSet { | |
updateRegex() | |
} | |
} | |
var expressionOptions: NSRegularExpressionOptions { | |
didSet { |