Skip to content

Instantly share code, notes, and snippets.

View mpelos's full-sized avatar

Marcelo Munhoz Pélos mpelos

View GitHub Profile
@mpelos
mpelos / Associating employees.md
Last active May 12, 2023 19:09
360 evaluation web application definition

User Story: As an administrator, I need to associate a registered user with their peers, manager (if applicable), and subordinates (if applicable), so that they can conduct a 360-degree evaluation process.

Acceptance Criteria:

  1. Given that I am an authenticated administrator, when I navigate to an employee's profile, then I should see options to associate peers, a manager, and subordinates.

  2. Given that I am viewing an employee's profile, when I select the option to associate peers, then I should see a list of all other employees from which I can select.

  3. Given that I am selecting peers, when I choose an employee from the list, then that employee should be added to the list of peers for the first employee.

@mpelos
mpelos / sheet-schema.yml
Last active July 14, 2022 23:43
RPG Sheet Example
$id: /schemas/character-sheet
title: GURPS Character Sheet
type: object
properties:
characterName:
type: string
basicAttributes:
type: object
properties:
@mpelos
mpelos / postgres-backup.bash
Last active April 22, 2021 03:25
Postgres docker container backup script
#!/bin/bash
filename=$(date +"%Y%m%d%H%M%S").out
dirname=$(date +"%Y-%m")
/usr/bin/docker exec postgres /usr/bin/pg_dumpall -U postgres > /tmp/$filename
gsutil cp /tmp/$filename gs://ebb-prod-postgres-backups/$dirname/$filename
rm -f /tmp/$filename
const Main = () => {
...
const salaryCalculate = new SalaryCalculator();
const salary = salaryCalculate.calculate(grossSalary);
return (
...
<LisResult
inss={salary.inss}
@mpelos
mpelos / rpg-sheet-example.yml
Last active July 20, 2020 01:48
rpg-sheet-example
cells:
- name: strength
type: input
visible: true
default: 10
- name: strength-cost
type: value
visible: true
formula: "({strength} - 10) * 10"
tags: [cost]
@mpelos
mpelos / google_cloud_functions_routing.py
Last active September 19, 2019 15:56
Python Flask routing on Google Cloud Functions with support for flask error handlers
import sys
import requests
from flask import Flask, request
app = Flask(__name__)
@app.route('/', methods=["GET"])
def index():
return "Index"
import * as $ from "jquery";
import { module as angularModule } from "angular";
import { contenteditable } from "../directives/contenteditable";
import { Component } from "../models/component";
import { idGenerator } from "../services/id_generator"
const moduleName = "directives.pageCanvas";
export let pageCanvas = moduleName;
angularModule(moduleName, [contenteditable]).directive("pageCanvas", function($compile: angular.ICompileService) {
module Argumentable
def self.included(base)
base.class_eval do
original_initailize = instance_method(:initialize)
define_method(:initialize) do |*args, &block|
@arguments = args
original_initailize.bind(self).call(*args, &block)
end
end
@mpelos
mpelos / README.md
Last active December 31, 2015 03:49

DESAFIO

Para a fase II gostaríamos que você desenvolvesse uma aplicação web com a última versão da Plataforma Ruby on Rails (Open Source).

O objetivo é desenvolver uma aplicação para controle de despesas. Um responsável (pessoa) pode ter várias despesas. O sistema deverá conter:

  1. Interface para cadastro dos responsáveis com os seguintes campos obrigatórios:
  • Nome e Email
  • Gerar o CRUD completo (Criação, Exibição, Atualização e Remoção)
@mpelos
mpelos / deploy.rb
Created September 3, 2012 23:57
Locaweb's Capistrano recipe
require "bundler/capistrano"
set :application, "set your application name here"
set :user, "set your Locaweb's user"
set :server_addr, "set the Locaweb's server ip address or your ftp address"
set :deploy_to, "/home/#{user}/rails_apps/#{application}"
set :rails_env, "production"
set :use_sudo, false
# Git settings