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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="white">#FFFFFF</color> | |
<color name="white_12">#F9F9F9</color> | |
<color name="white_30">#FBFBFB</color> | |
<color name="white_70">#FDFDFD</color> | |
<color name="black">#000000</color> | |
<color name="black_12">#DADADA</color> | |
<color name="black_26">#B8B8B8</color> | |
<color name="black_54">#727272</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
<?php $unserialized = null; ?> | |
<h1><a href="test_serialize.php">Test PHP unserialize</a></h1> | |
<form action="test_serialize.php" method="post"> | |
<p> | |
Unserialize: <?php | |
if (isset($_POST['v'])) { | |
$v = unserialize($_POST['v']); | |
if ($v) { | |
$unserialized = $v; | |
echo '<span style="color:green">Success</span>'; |
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
func isConnectedToProxy() -> Bool { | |
let host = "http://www.example.com" | |
if let url = URL(string: host), | |
let proxySettingsUnmanaged = CFNetworkCopySystemProxySettings() { | |
let proxySettings = proxySettingsUnmanaged.takeRetainedValue() | |
let proxyUnmanaged = CFNetworkCopyProxiesForURL(url as CFURL, proxySettings) | |
if let proxies = proxyUnmanaged.takeRetainedValue() as? [[String : AnyObject]], proxies.count > 0 { | |
let proxy = proxies[0] | |
let key = kCFProxyTypeKey as String | |
let value = kCFProxyTypeNone as String |
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
func isConnectedToVpn() -> Bool { | |
let host = "www.example.com" | |
guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { | |
return false | |
} | |
var flags = SCNetworkReachabilityFlags() | |
if SCNetworkReachabilityGetFlags(reachability, &flags) == false { | |
return false | |
} | |
let isOnline = flags.contains(.reachable) && !flags.contains(.connectionRequired) |