Skip to content

Instantly share code, notes, and snippets.

View marco-martins's full-sized avatar

Marco Martins marco-martins

View GitHub Profile
@marco-martins
marco-martins / tmux-cheatsheet.markdown
Created December 10, 2020 11:37 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@marco-martins
marco-martins / metadata.json
Last active June 13, 2022 19:44 — forked from ayo-dan/metadata.json
MPP Homework Lecture 4
{"valueParameterInfo":[["Bank Deposit",{"valueParameterFormat":{"contents":[6,""],"tag":"DecimalFormat"},"valueParameterDescription":""}],["Client Deposit",{"valueParameterFormat":{"contents":[6,""],"tag":"DecimalFormat"},"valueParameterDescription":""}]],"timeParameterDescriptions":[["Bank Deposit Timeout",""],["Client Deposit Timeout 1",""]],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@marco-martins
marco-martins / Main.hs
Created June 13, 2022 17:56 — forked from ajuggler/Main.hs
MPP - Bank Client agreement (homework)
{-# LANGUAGE OverloadedStrings #-}
module Example where
import Language.Marlowe.Extended
np = 3 :: Integer -- Number of payments (positive integer)
am = 50 :: Integer -- Amount (in Ada) of each deposit by Client (positive integer)
main :: IO ()
main = printJSON $ contract np am (TimeParam "Bank Deadline") (TimeParam "Client Deadline")
@marco-martins
marco-martins / Main.hs
Created June 17, 2022 09:35 — forked from CardanoDVPR/Main.hs
Bank or Client Pay in Haskell
{-# LANGUAGE OverloadedStrings #-}
module Example where
import Language.Marlowe.Extended
main :: IO ()
main = printJSON $ contract "Bank" "Client" 5 50 (TimeParam "BankDeadline") (TimeParam "ClientDeadlines")
{- Define a contract where the Bank makes an initial deposit and the Client makes a series of deposits of
{-# LANGUAGE OverloadedStrings #-}
module Example where
import Language.Marlowe.Extended
-- Simulates an auto loan for a used car with compound interest. Native token represents title for the car.
-- Input loan amount. We imagine the car costs 5000 ADA
loan_amount_in_ADA = 5000 :: Double