Skip to content

Instantly share code, notes, and snippets.

💕
Tak tak tak tak coding

Billie Thompson PurpleBooth

View GitHub Profile
View MessageSenderService.php
<?php
namespace Armakuni\Demo\PhpInserter;
use Google\Cloud\PubSub\PubSubClient;
class MessageSenderService
{
View CounterService.php
<?php
namespace Armakuni\Demo\PhpCounter;
use Google\Cloud\Datastore\DatastoreClient;
class CounterService
{
View command.sh
#!/usr/bin/env bash
docker build -t gcr.io/$(gcloud config get-value project)/simple-example:latest .
docker push gcr.io/$(gcloud config get-value project)/simple-example
gcloud beta run deploy --image gcr.io/$(gcloud config get-value project)/simple-example:latest
View command.sh
#!/usr/bin/env bash
docker build -t image-name .
docker run -e PORT=8080 -p 8080:8080 -d --name container-name image-name
docker logs container-name
curl localhost:8080
docker stop container-name
View Dockerfile
FROM php:7-apache
RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
COPY . /var/www/html
RUN chown -R www-data:www-data /var/www/html
@PurpleBooth
PurpleBooth / examples.md
Last active Apr 12, 2019
Tracing Example
View examples.md

Distributed Tracing: From Chaos to Clarity

Supporting Material.

The Slides

Live Example

View trace.py
from functools import wraps
import jaeger_client
from flask import current_app
from flask_opentracing import FlaskTracer
from opentracing_instrumentation.client_hooks import requests, strict_redis, sqlalchemy
from opentracing_instrumentation.request_context import RequestContextManager
def install_tracer(service_name, flask_app=None):
@PurpleBooth
PurpleBooth / truth-table.csv
Created Sep 3, 2018
Three process project plus WIP
View truth-table.csv
Develop Current Task QA Current Task QA Older Task Release Current Task Release Older Task Release Even Older Task On Time
T T T T T T T
T T T T T F F
T T T T F T F
T T T T F F F
T T T F T T F
T T T F T F F
T T T F F T F
T T T F F F F
T T F T T T F
@PurpleBooth
PurpleBooth / truth-table.csv
Last active Sep 3, 2018
Three process project
View truth-table.csv
Develop QA Release On Time
T T T T
T T F F
T F T F
T F F F
F T T F
F T F F
F F T F
F F F F
@PurpleBooth
PurpleBooth / truth-table.csv
Last active Sep 3, 2018
Two process project
View truth-table.csv
Develop Release On Time
T T T
F T F
T F F
F F F
You can’t perform that action at this time.