Skip to content

Instantly share code, notes, and snippets.

View jadenlemmon's full-sized avatar
🚀
Hacking away

Jaden Lemmon jadenlemmon

🚀
Hacking away
View GitHub Profile
@jadenlemmon
jadenlemmon / config.yml
Created March 23, 2022 19:39
Island List Example Voyage Config
# .voyage/config.yml
services:
app:
context: ./
primary: true
exposePort: 5000
environment:
- name: APP_ENV
value: voyage
- name: DB_HOST
@jadenlemmon
jadenlemmon / app.py
Created March 23, 2022 19:40
Example Flask App
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
@jadenlemmon
jadenlemmon / Dockerfile
Created March 23, 2022 19:44
Island List Example Dockerfile
FROM voyageapp/node:17.6-alpine as node
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run css
FROM python:3.8-alpine
# Install NVM
# https://github.com/nvm-sh/nvm#install--update-script
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
# Install Docker
# https://docs.docker.com/engine/install/ubuntu/
sudo apt-get update -y && \
sudo apt-get install -y \
ca-certificates \
curl \
@jadenlemmon
jadenlemmon / wolf-config-schema.yaml
Created April 25, 2023 19:21
wolf config schema
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome6",
"definitions": {
"Welcome6": {
"type": "object",
"additionalProperties": false,
"properties": {
"k8s": {
"$ref": "#/definitions/K8S"
@jadenlemmon
jadenlemmon / gcp_idle_vm.sh
Created October 13, 2023 16:32
GCP Idle VM Shutdown Script
#!/bin/bash
# Add this script to instance metadata and reboot
# gcloud compute instances add-metadata INSTANCE_NAME --metadata-from-file startup-script=gcp_idle_vm.sh
# To follow logs sudo journalctl -f -u google-startup-scripts.service
# For this to work ensure your vm is private or has appropriate firewall rules
# otherwise brute force attacks will keep your vm alive
has_connection_existed=false
idle_count=0