- Pick something and implement it
- The topics are open-ended
- Pairing is suggested
- Want to try some new tech, this is a great time
- You may use any tools that you like, including code generators and AI, but make sure you can roughly explain what your code is going at the end
- Towards the end, we'll ask people to show off their work. A demo or quick code walk through. Nothing crazy, just a couple minutes.
- You must decide what you implement. Consider time, what you can deliver, what you can reasonably demo, and wow factor.
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"os" | |
"path/filepath" | |
"strings" | |
"github.com/BurntSushi/toml" |
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
#!/bin/bash | |
set -eio pipefail | |
IMAGE="$1" | |
TAG="$2" | |
TOKEN=$(curl -s "https://auth.docker.io/token?scope=repository:$IMAGE:pull&service=registry.docker.io" | jq -r .token) | |
MANIFEST=$(curl -s -L -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/$IMAGE/manifests/$TAG) |
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
package com.example.demo; | |
import org.cloudfoundry.client.CloudFoundryClient; | |
import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupsRequest; | |
import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupsResponse; | |
import org.cloudfoundry.client.v2.securitygroups.SecurityGroupResource; | |
import org.cloudfoundry.reactor.ConnectionContext; | |
import org.cloudfoundry.reactor.DefaultConnectionContext; | |
import org.cloudfoundry.reactor.TokenProvider; | |
import org.cloudfoundry.reactor.client.ReactorCloudFoundryClient; |
https://gist.github.com/dmikusa-pivotal/67eb684ea3d3606cee6db5995ba4c4e3
To start:
docker run -d -p 5000:5000 --restart=always -e REGISTRY_STORAGE_DELETE_ENABLED=true -v registry-volume:/var/lib/registry --name registry registry:2
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
#!/bin/bash | |
set -e | |
# requires `jq` | |
function load_all_pages { | |
URL="$1" | |
DATA="" | |
until [ "$URL" == "null" ]; do | |
RESP=$(cf curl "$URL") | |
DATA+=$(echo "$RESP" | jq .resources) |
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
#!/bin/bash | |
# | |
# See https://mikusa.blogspot.com/2019/07/php-cloud-native-buildpacks.html | |
# | |
# create private bridge network | |
docker network create -d bridge test-app-bridge | |
# create db | |
docker run --name test-db --network test-app-bridge -e MYSQL_ROOT_PASSWORD=hacKm3 -d percona |
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
#!/bin/bash | |
# | |
# Find an app with an exact name, app must be visible to the logged in user | |
# | |
set -e | |
function load_all_pages { | |
URL="$1" | |
DATA="" | |
until [ "$URL" == "null" ]; do |
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
#!/usr/bin/env ruby | |
require 'yaml' | |
require 'openssl' | |
def confirm | |
print " Enter (y/n)... " | |
begin | |
while input = STDIN.gets.downcase.strip | |
case input | |
when "y" |
To test this:
- Run
npm install
oryarn install
- Run
node index.js && ssh -p 2222 cf:$(cf app app-name --guid)/[email protected]
, whereapp-name
is your app name andssh.system.domain.com
is the DNS name of your SSH end point. - When prompted for a password, enter the code listed after
Access Code is
.
You should now be SSH'd into the given application & instance id.
NOTE: better error handling should be done, but has been omitted to keep this example brief.
NewerOlder