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
// In reference to: | |
// https://www.reddit.com/r/dailyprogrammer/comments/6i60lr/20170619_challenge_320_easy_spiral_ascension/ | |
let input = 5 | |
enum Direction { | |
case right, down, left, up | |
mutating func turn() { | |
switch self { |
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
// In reference to: | |
// https://www.reddit.com/r/dailyprogrammer/comments/6grwny/20170612_challenge_319_easy_condensing_sentences/ | |
let input = """ | |
Deep episodes of Deep Space Nine came on the television only after the news. | |
Digital alarm clocks scare area children. | |
""" | |
var lines = input.split(separator: "\n") |
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
// In reference to: | |
// https://www.reddit.com/r/dailyprogrammer/comments/69y21t/20170508_challenge_314_easy_concatenated_integers/ | |
let input = """ | |
79 82 34 83 69 | |
420 34 19 71 341 | |
17 32 91 7 46 | |
""" | |
func pad (_ strToPad: String, maxLength: Int) -> 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
# I recently needed to automate the process of spinning up Windows EC2 instances | |
# in AWS, installing ZeroTier, and then joining them to a ZeroTier network. I | |
# used Terraform to do this. This example might help others. If you provide an | |
# existing subnet, security group, ZeroTier network ID, and a few other details | |
# via Terraform variables, this template will create one demo Windows instance | |
# in AWS, install ZeroTier, and join the instance to the specified ZeroTier | |
# network. | |
variable "aws_region" { | |
description = "AWS Region where this instance will be deployed (ie: us-east-1)" |