Skip to content

Instantly share code, notes, and snippets.

@Maurifc
Maurifc / Vagrantfile
Created January 17, 2022 15:17
Basic Vagrantfile - Ubuntu Bionic
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.network "private_network", ip: "10.10.10.50"
config.vm.provider "virtualbox" do |vb|
vb.name = "linux-ubuntu"
vb.memory = "512" # Change the RAM amount here
vb.cpus = 2 # Change de CPU vCore amount here
@Maurifc
Maurifc / docker-compose-boilerplate.yaml
Last active October 11, 2022 14:33
Docker - Docker compose boilerplate
version: '3.7'
services:
mongodb:
image: mongo:5.0-focal
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
MONGO_INITDB_DATABASE: computers-api
ports:
- "27017:27017"
@Maurifc
Maurifc / Dockerfile NodeJS
Last active November 22, 2022 20:22
Docker - Basic Dockerfile for NodeJS
FROM node:16-alpine
RUN mkdir $HOME/app
WORKDIR $HOME/app
COPY --chown=node:node package.json $HOME/app/
RUN npm install
COPY --chown=node:node . $HOME/app
@Maurifc
Maurifc / provider.tf
Created September 1, 2022 01:06
Terraform - provider.tf boilerplate
#----------------------------------------------------------------------------
# PROVIDERS
#----------------------------------------------------------------------------
terraform {
required_version = "1.2.7"
required_providers {
google = {
source = "hashicorp/google"
@Maurifc
Maurifc / project.tfvars
Created September 1, 2022 01:07
Terraform - Boilerplate for .tfvars
project = "gcp-project-id"
region = "southamerica-east1"
zone = "southamerica-east1-a"
@Maurifc
Maurifc / .pre-commit-config.yaml
Created September 1, 2022 01:08
Terraform - Basic .pre-commit config file
repos:
- repo: https://github.com/terraform-docs/terraform-docs
rev: "v0.16.0"
hooks:
- id: terraform-docs-go
args: ["markdown", "table", "--output-file", "README.md", "."]
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: "v1.74.1"
hooks:
- id: terraform_fmt
@Maurifc
Maurifc / gitignore.terraform
Last active October 31, 2022 12:16
Terraform - Git ignore file for Terraform projects
# Local .terraform directories
**/.terraform/*
# .tfstate files
*.tfstate
*.tfstate.*
.infracost
# Crash log files
crash.log
@Maurifc
Maurifc / bitbucket-pipelines.yml
Created September 1, 2022 01:35
Bitbucket - Bitbucket pipeline boilerplate
image: python:3.10
pipelines:
pull-requests:
'**':
- step:
name: Linter
script:
- echo Linting...
branches:
@Maurifc
Maurifc / bash-script-boilerblate.sh
Last active November 19, 2022 13:19
Bash - A boilerplate for a bash script
#!/bin/bash
ACTION=$1
function help(){
echo -e \
"Usage:
1. Export ESSENTIAL_VARIABLE varible with...
$ export ESSENTIAL_VARIABLE=<KEY_PATH>
@Maurifc
Maurifc / nodejs.gitignore
Created September 3, 2022 21:41
Git - Git ignore for NodeJS applications
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)