I hereby claim:
- I am nickplee on github.
- I am nickplee (https://keybase.io/nickplee) on keybase.
- I have a public key ASBqQhEp99B5vpH_t3ofz4NVxjSclPj-y6msG_CTjnpjEwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
extension Data { | |
var hexString: String { | |
return withUnsafeBytes { (b: UnsafePointer<UInt8>) -> String in | |
var output = "" | |
let end = b.advanced(by: count) | |
var ptr = b | |
while ptr < end { | |
let value = ptr[0] | |
output += String(format: "%02X", arguments: [value]) | |
ptr = ptr.advanced(by: 1) |
// Inspired by: http://stackoverflow.com/questions/16243855/how-to-detect-that-a-provisioning-profile-is-for-development-or-distribution-pr | |
static let isDebugBuild: Bool = { | |
#if (!arch(i386) && !arch(x86_64)) && os(iOS) | |
guard let profileURL = Bundle.main.url(forResource: "embedded", withExtension: "mobileprovision"), var profileString = try? String(contentsOf: profileURL, encoding: .ascii) else { | |
return false | |
} | |
profileString = profileString.components(separatedBy: .whitespacesAndNewlines).joined() | |
return profileString.range(of: "<key>get-task-allow</key><true/>") != nil | |
#else |
#include <iostream> | |
#include <concurrent_vector.h> | |
#include <thread> | |
#include <algorithm> | |
#include <cstdlib> | |
#include <atomic> | |
#include <vector> | |
#include <mutex> | |
int counter = 0; |