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 | |
# 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 |
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
{ | |
"$schema": "http://json-schema.org/draft-06/schema#", | |
"$ref": "#/definitions/Welcome6", | |
"definitions": { | |
"Welcome6": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"k8s": { | |
"$ref": "#/definitions/K8S" |
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
# 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 \ |
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
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 |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello_world(): | |
return "<p>Hello, World!</p>" |
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
# .voyage/config.yml | |
services: | |
app: | |
context: ./ | |
primary: true | |
exposePort: 5000 | |
environment: | |
- name: APP_ENV | |
value: voyage | |
- name: DB_HOST |
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
version: "3" | |
services: | |
app: | |
build: | |
context: ./ | |
environment: | |
APP_ENV: local | |
DB_HOST: database | |
networks: | |
- islandfinder |
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
module.exports = { | |
content: ["./lib/templates/**/*.{html,j2}"], | |
theme: { | |
extend: {}, | |
}, | |
plugins: [require("@tailwindcss/forms")], | |
}; |
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
[alias] | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
c = checkout | |
cb = checkout -b | |
s = status | |
# push the current branch | |
pub = "!git push -u origin $(git branch-name)" | |
# open a pr in github | |
open = "!f() { open \"$(git ls-remote --get-url $(git config --get branch.$(git branch --show-current).remote) | sed 's|[email protected]:\\(.*\\)$|https://github.com/\\1|' | sed 's|\\.git$||')/compare/$(git config --get branch.$(git branch --show-current).merge | cut -d / -f 3-)?expand=1\"; }; f" | |
last = log -1 HEAD --stat |
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
import { sample } from 'lodash'; | |
import React from 'react'; | |
import cookie from 'cookie'; | |
import Layout from '../components/layout'; | |
import HomeV1 from '../components/scenes/home/v1'; | |
import HomeV2 from '../components/scenes/home/v2'; | |
const EXPERIMENT_OPTIONS = { | |
v1: HomeV1, | |
v2: HomeV2, |
NewerOlder