Skip to content

Instantly share code, notes, and snippets.

View ProFL's full-sized avatar

Pedro Linhares ProFL

View GitHub Profile
<mxfile host="app.diagrams.net">
<diagram id="activity_diagram" name="Assignment Hand-in">
<mxGraphModel dx="769" dy="1263" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1400" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" parent="1" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" value="&lt;b&gt;&lt;font style=&quot;font-size: 18px;&quot;&gt;Assignment Hand-in&lt;/font&gt;&lt;/b&gt;" vertex="1">
<mxGeometry height="40" width="720" x="80" as="geometry" />
</mxCell>
<mxCell id="lane1" parent="1" style="swimlane;whiteSpace=wrap;html=1;startSize=30;" value="Student" vertex="1">
@ProFL
ProFL / docker-compose-volume-backup.sh
Created June 2, 2023 19:16
A script to backup docker compose volumes
#!/bin/bash
# Volume backup script
read -p 'Insert volume to backup name (project_postgres)' TO_BKP_VOLUME
TO_BKP_VOLUME=${TO_BKP_VOLUME:-project_postgres}
if docker volume inspect "${TO_BKP_VOLUME}" && exit 0; then
BKP_VOLUME="${TO_BKP_VOLUME}_$(date date +%Y-%m-%d-%H-%M)"
@ProFL
ProFL / install_aab.md
Last active June 27, 2024 00:36
Colinha para instalar aplicativos AAB

Pre-requisites

#!/bin/sh

# Path to the downloaded bundletool jar
BUNDLETOOL_PATH=bundletool-all-1.16.0.jar
@ProFL
ProFL / docker-install.sh
Last active November 3, 2020 23:23
Script to install docker that works on either Ubuntu or Linux Mint (might work on other Ubuntu derivatives) -- Heavily based on: https://docs.docker.com/engine/install/ubuntu/
#!/bin/sh
# Remove old docker installs
sudo apt-get remove -qy docker docker-engine docker.io containerd runc > /dev/null 2>&1
# Update cache and install dependencies
sudo apt-get update -qm
sudo apt-get install -qy \
apt-transport-https \
ca-certificates \
curl \
@ProFL
ProFL / print_floats.go
Last active September 29, 2020 23:42
A study of IEEE 754 (single precision floating point numbers) in Go
package main
import (
"encoding/binary"
"encoding/hex"
"flag"
"fmt"
"math"
"os"
"strconv"
@ProFL
ProFL / php-apache.hpa.yml
Created July 16, 2020 21:27
Especificação completa do HPA (autoscaling/v2beta2 - K8s 1.18) explicada com comentários
# Ver https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics
# Definição do recurso a ser criado (HPA do autoscaling/v2beta2 chamado php-apache)
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: php-apache
# Configuração do recurso
spec:
# Lógica de seleção do recurso monitorado, seleciona um Deployment do apps/v1,
# chamado php-apache
@ProFL
ProFL / docker-compose.yml
Created June 22, 2020 16:55
A simple docker-compose file to use with jupyter notebooks using anaconda, good for some quick and dirty Data Science and ML related works
version: "2.4"
services:
jupyter:
init: true
image: continuumio/anaconda3
command: "jupyter notebook \
--ip='*' \
--allow-root \
--no-browser \
@ProFL
ProFL / cana_contratos_insertion_sort.cpp
Last active June 17, 2020 03:19
A simple insertion sort implementation assignment executed and timed in C++, the data to be sorted is loaded from a CSV like file that is space-separated.
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <chrono>
using std::string;
using std::vector;
typedef struct contrato_t
@ProFL
ProFL / Desenvolvedor Backend Node.js - Desafio dos entrevistados entre 04 e 09 de Setembro de 2019.md
Last active September 9, 2019 14:42
Descrição do desafio a ser executado pelos candidatos da vaga de Desenvolvedor Backend (Node.js) no departamento de P&D da Mob Telecom.
@ProFL
ProFL / build.sh
Last active February 14, 2019 14:06
Build song! A script that uses VLC to play a song from YouTube during your build so that you can go AFK and know when its done because the music stopped
#!/bin/bash
vlc --no-video -I dummy -L -q 'https://www.youtube.com/watch?v=G1IbRujko-A' &
echo 'Enjoy some Epic Sax from https://www.youtube.com/watch?v=G1IbRujko-A during the build :)'
# Your build command goes here
kill $!