This file contains hidden or 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
public class Channel<Value> { | |
private class Subscription { | |
weak var object: AnyObject? | |
private let notifyBlock: (Value) -> Void | |
private let queue: DispatchQueue | |
var isValid: Bool { | |
return object != nil |
This file contains hidden or 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
// without turtle drawing a hexagon is math heavy and not trivial to modify | |
let numberOfSides: CGFloat = 6 | |
let radiusOuterCircle: CGFloat = 30 | |
let sideLength = radiusOuterCircle / 2 | |
let theta = (CGFloat.pi * 2) / numberOfSides | |
let centerX = sideLength / 2 | |
let centerY = sideLength / 2 | |
let initialPoint = CGPoint(x: radiusOuterCircle * cos(2 * CGFloat.pi * 0/numberOfSides + theta) + centerX, y: radiusOuterCircle * sin(2 * CGFloat.pi * 0/numberOfSides + theta) + centerX) |
This file contains hidden or 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
unzip -oq IDQuantOnCalDemo.ipa | |
security cms -Di Payload/IDQuantOnCalDemo.app/embedded.mobileprovision > mobileprovision.plist | |
/usr/libexec/PlistBuddy -c "Print :ProvisionedDevices" mobileprovision.plist > provisioneddevices.txt |
This file contains hidden or 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
## Server configuration for nginx to host Atlassian Jira / Jetbrain TeamCity or any other Tomcat web application | |
# | |
# author cedric.walter, www.waltercedric.com | |
# to be saved for ex in /etc/nginx/sites-available/example | |
server { | |
listen 80; | |
server_name jira.example.com; | |
access_log off; | |
location / { |