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
# Obtain Lets-Encrypt SSL Certificate via Docker DNS challenge | |
# adjust: | |
# - domains (-d foo.me) | |
mkdir letsencrypt_etc letsencrypt_var | |
docker run -it --rm --name certbot \ | |
-v "./letsencrypt_etc:/etc/letsencrypt" \ | |
-v "./letsencrypt_var:/var/lib/letsencrypt" \ | |
certbot/certbot certonly -d foo.me -d *.foo.me --manual --preferred-challenges dns |
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
== How to Implement an AWS Lambda function using Swift 4 | |
1. Use the appropriate docker image to build a Swift 4 executable. | |
docker run -it -v "$(PWD):/app" doctorimpossible/swift4ubuntu bash | |
mkdir demo; cd demo | |
swift package init --type executable | |
:: edit Sources/demo/main.swift |
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
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "Hacker News", | |
"description": "<p>Hacker News API</p>\n", | |
"version": "1.0.1" | |
}, | |
"host": "hacker-news.firebaseio.com", | |
"basePath": "/v0", | |
"schemes": [ |
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
{ | |
"AWSEBDockerrunVersion": "1", | |
"Image": { | |
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>", | |
"Update": "true" | |
}, | |
"Ports": [ | |
{ | |
"ContainerPort": "443" | |
} |
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
######################## | |
## Variables | |
######################## | |
variable "environment_name" { | |
description = "The name of the environment" | |
} | |
variable "vpc_id" { |
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
internal let DEFAULT_MIME_TYPE = "application/octet-stream" | |
internal let mimeTypes = [ | |
"html": "text/html", | |
"htm": "text/html", | |
"shtml": "text/html", | |
"css": "text/css", | |
"xml": "text/xml", | |
"gif": "image/gif", | |
"jpeg": "image/jpeg", |
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 UIKit | |
import Security | |
let serviceIdentifier = "com.company" | |
let accessGroup = "com.company.app" | |
let kSecClassValue = kSecClass as NSString | |
let kSecAttrAccountValue = kSecAttrAccount as NSString | |
let kSecValueDataValue = kSecValueData as NSString | |
let kSecClassGenericPasswordValue = kSecClassGenericPassword as NSString |
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
-- | |
-- Table structure for table `currency` | |
-- | |
CREATE TABLE IF NOT EXISTS `currency` ( | |
`iso` char(3) CHARACTER SET utf8 NOT NULL DEFAULT '', | |
`name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, | |
PRIMARY KEY (`iso`), | |
UNIQUE KEY `name` (`name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
NewerOlder