Skip to content

Instantly share code, notes, and snippets.

View Cussa's full-sized avatar

Cussa Mitre Cussa

View GitHub Profile
@Cussa
Cussa / macro.js
Created May 27, 2024 07:03
d6 Legends Roller macro
(async () => {
// Prompt the user for the number of dice
let diceRoll = new Dialog({
title: "Dice Roll",
content: `<p>Enter the number of dice:</p><input type="number" id="numDice" value="1" min="1">`,
buttons: {
roll: {
label: "Roll",
callback: async (html) => {
try {
@Cussa
Cussa / D20
Last active September 25, 2020 21:30
Roll20 Macros
&{template:simple} {{rname=Normal}} {{mod=?{Bonus|0}}} {{r1=[[1d20+?{Bonus}]]}} {{normal=1}}
@Cussa
Cussa / Program_Duplicated.cs
Last active March 17, 2020 18:13
Código Duplicado - Nota de Prova
using System;
namespace HodStudio.Exemplos
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Informe a nota da prova 1:");
var prova1 = decimal.Parse(Console.ReadLine());
@Cussa
Cussa / ImpostoNotaFiscal_CodigoDuplicado.cs
Created March 3, 2020 13:04
Evitando código duplicado
public class ImpostosNotaFiscal
{
public decimal CalcularValorLiquido(decimal valorNotaFiscal)
{
var impostoPis = CalcularPis(valorNotaFiscal);
var impostoCofins = CalcularCofins(valorNotaFiscal);
var impostoIrpj = CalcularIrpj(valorNotaFiscal);
var impostoCsll = CalcularCsll(valorNotaFiscal);
var impostos = impostoPis + impostoCofins + impostoIrpj + impostoCsll;
return valorNotaFiscal - impostos;