I've moved the study notes to a GitHub repository.
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
#!/usr/bin/env bash | |
org=kojai | |
app=web-services | |
branch=`git rev-parse --abbrev-ref HEAD` | |
if [ "$branch" == master ]; then | |
branch=latest | |
fi |
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
chmod -R u+rwX,go+rX,go-w /path/to/dir |
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
#!/bin/bash | |
set -e | |
function print_usage { | |
cat << EOF | |
Usage: $0 hostname destination_directory | |
Generate self-signed SSL certificate assets for hostname, placing the files in the destination_directory | |
The following files will be created: |
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
# Add CORS headers when Origin header is present | |
capture request header origin len 128 | |
http-response set-header Access-Control-Allow-Origin %[capture.req.hdr(0)] if { capture.req.hdr(0) -m found } | |
http-response set-header Access-Control-Allow-Methods GET,\ HEAD,\ OPTIONS,\ POST,\ PUT if { capture.req.hdr(0) -m found } | |
http-response set-header Access-Control-Allow-Credentials true if { capture.req.hdr(0) -m found } | |
http-response set-header Access-Control-Allow-Headers Origin,\ Accept,\ X-Requested-With,\ Content-Type,\ Access-Control-Request-Method,\ Access-Control-Request-Headers,\ Authorization if { capture.req.hdr(0) -m found } | |
# Google Cloud Platform ESP does not support CORS | |
# We want to return a 204 regardless | |
http-response set-status 204 if { capture.req.hdr(0) -m found } METH_OPTIONS |
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
// Copyright 2019 Vy-Shane Xie | |
package mu.node.sample.fdb | |
import com.apple.foundationdb.record.provider.foundationdb.FDBDatabaseFactory | |
import com.spotify.docker.client.messages.PortBinding | |
import com.whisk.docker.testkit.ContainerState.{HasId, Ready} | |
import com.whisk.docker.testkit.{ | |
BaseContainer, | |
ContainerCommandExecutor, |
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
#!/bin/sh | |
# | |
# Quickly generate a new Xcode project using Swift Package Manager, | |
# and open the project's main.swift in the Xcode editor. | |
pwd=$(pwd) | |
mkdir $1 | |
cd $1 | |
swift package init |