Install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install pyenv
brew update
brew install pyenv
Add the following to ~/.zprofile
function parse_request() { | |
// get current url | |
$current = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | |
// calculate the path | |
$part = substr( $current, strlen( site_url() ) ); | |
if ( $part[0] == '/' ) { | |
$part = substr( $part, 1 ); | |
} | |
// strip parameters | |
$real = explode( '?', $part ); |
FROM ubuntu:16.04 | |
MAINTAINER Brandon Braner | |
RUN apt-get install gnupg && gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553 && gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010 \ | |
&& gpg -a --export 8B48AD6246925553 | apt-key add - && gpg -a --export 7638D0442B90D010 | apt-key add - \ | |
&& echo "deb http://ftp.de.debian.org/debian experimental main" >> /etc/apt/sources.list \ | |
&& echo "deb http://ftp.de.debian.org/debian unstable main" >> /etc/apt/sources.list \ | |
&& apt-get update && apt-get -y upgrade \ | |
&& apt-get install -y nginx && apt install -y python3.6 \ |
def print_message(message): | |
""" | |
Function to limit the printing of messages | |
This will limit the printing of messages to amount per second | |
:param message: | |
:return: | |
""" | |
window = 1 | |
max_messages = 5 | |
message_count = 0 |
version: '3' | |
services: | |
node1: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1 | |
container_name: node1-7.12.1 | |
environment: | |
- node.name=node1 | |
- cluster.name=elasticsearch-first-steps | |
- discovery.type=single-node | |
- bootstrap.memory_lock=true |
from supabase_py import create_client, Client | |
SUPABASE_URL = "https://url.supabase.co" | |
SUPABASE_KEY = "secret_key" | |
#### Start signin | |
# api call to sign in and get the user access token for futuer api calls | |
supabase: Client = create_client(SUPABASE_URL, SUPABASE_KEY) | |
user = supabase.auth.sign_in( |
readme.md
to the root. Mine was a copy and paste of the requirements and a quick blurb of what I implemented.apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: hello-kubernetes | |
labels: | |
app: hello-kubernetes | |
spec: | |
rules: | |
- http: | |
paths: |
kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client] [--overrides=inline-json] [--command] -- [COMMAND] [args...] [options]
create nginx pod with env vars exposed on port 80
kubectl run nginx-pod --image=nginx --env="DNS_DOMAIN=cluster" --env="SOME_SECRET=secret" --port=80
create python pod and print the version number.
from fastapi import FastAPI, Depends | |
from myservice import UserService, User, UserCreate | |
app = FastAPI() | |
class UserService: | |
def create_user(self): | |
return 'doing something that creates user' |