Skip to content

Instantly share code, notes, and snippets.

View leozz37's full-sized avatar
🛠️
Hope is not a strategy

Leonardo Lima leozz37

🛠️
Hope is not a strategy
View GitHub Profile
@leozz37
leozz37 / cover.png
Last active December 28, 2020 17:41
Embedded
cover.png
@leozz37
leozz37 / docker.yml
Last active November 18, 2020 12:54
GitHub Actions Docker build workflow
name: Docker
on:
push: {}
pull_request: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
@leozz37
leozz37 / GCP-deploy.yml
Last active October 3, 2020 02:07
GitHub Actions Workflow Cloud Run deploy script
name: Docker
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
@leozz37
leozz37 / Dockerfile
Created September 19, 2020 14:58
Grafana Custom Docker Image
FROM grafana/grafana
EXPOSE 3000
ENTRYPOINT [ "/run.sh" ]
@leozz37
leozz37 / prometheus.yml
Created September 19, 2020 14:43
Prometheus Config File
global:
scrape_interval: 10s
evaluation_interval: 10s
external_labels:
monitor: 'codelab-monitor'
scrape_configs:
- job_name: 'temperature'
scrape_interval: 5s
static_configs:
@leozz37
leozz37 / .travis.yml
Last active October 2, 2020 01:18
Travis file for deploying on AWS ECL
language: python
sudo: true
python:
- "3.8"
services:
- docker
before_script:
- pip install docker-compose
# Python Alpine is a lightweighted version of Python
FROM python:3.8-alpine
# Installing dependencies
COPY ./requirements.txt ./requirements.txt
RUN pip install -r /requirements.txt
# Copying the source code to
RUN mkdir /app
WORKDIR /app
Flask==1.1.2
pytest==6.0.1
pytest-cov==2.10.1
@leozz37
leozz37 / main.py
Created August 16, 2020 09:34
Snippet used for a Medium article
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello, Medium!'
app.run(host='0.0.0.0', port=8000)
#include <spdlog/spdlog.h>
int main() {
spdlog::info("Hello world!");
return 0;
}