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 / sns-policy
Last active September 30, 2015 19:14
{
"Version": "2008-10-17",
"Id": "__default_policy_ID",
"Statement": [
{
"Sid": "__default_statement_ID",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
class Cloudy::CloudWorker
class CurrentStepNotFound < StandardError; end
class StepClassNotFound < StandardError; end
class CanNotAsyncExecuteFirstStep < StandardError; end
# @!attribute customer_repository
# @return [CustomerRepository] the customer repository
attr_accessor :customer_repository
# @!attribute pipeline_manager