Skip to content

Instantly share code, notes, and snippets.

View lmarqs's full-sized avatar

Lucas Marques lmarqs

View GitHub Profile
@lmarqs
lmarqs / scripts
Created June 6, 2023 21:20
Kubernetes hello word!
# install
helm repo add stakater https://stakater.github.io/stakater-charts
helm repo update
helm install app-lucas-marques stakater/application
# check
curl http://aaa18f0945c0c4557a4d374e30322eed-541031350.us-east-1.elb.amazonaws.com -H 'Host: lucas-marques.medprev.app'
# uninstall
@lmarqs
lmarqs / README.md
Created April 24, 2023 15:36 — forked from zytek/README.md
Terraform to manage AWS RDS PostgreSQL databases, users and owners

Terraform vs PostgreSQL RDS

Thanks to new resources (postgresql_default_priviledges) and some fixes Terraform can now add new databases and manage ownership / access to them.

This example creates new database and two users. You can use owner to create new tables and run migrations and user for normal read/write access to database.

@lmarqs
lmarqs / private-github-release-download.sh
Created June 21, 2020 18:01 — forked from illepic/private-github-release-download.sh
Download the latest release binary from a private GitHub repo. (i.e. a .tar.gz that you have manually uploaded in a GitHub release). Update OAUTH_TOKEN, OWNER, REPO, FILE_NAME with your custom values.
#!/usr/bin/env bash
# Authorize to GitHub to get the latest release tar.gz
# Requires: oauth token, https://help.github.com/articles/creating-an-access-token-for-command-line-use/
# Requires: jq package to parse json
# Your oauth token goes here, see link above
OAUTH_TOKEN="34k234lk234lk2j3lk4j2l3k4j2kj3lk"
# Repo owner (user id)
OWNER="your-user-name"
#!/usr/bin/env node
const { spawnSync } = require('child_process');
const fs = require('fs');
const heads = spawnSync('git branch --list', [], { shell: true })
.stdout.toString()
.split('\n');
const head = heads.filter(l => l.startsWith('* ')).shift();
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- ./db:/var/lib/mysql
ports:
- 3306:3306
restart: always