Skip to content

Instantly share code, notes, and snippets.

View nathanganser's full-sized avatar
🏠
Working from home

Nathan Ganser nathanganser

🏠
Working from home
View GitHub Profile

Swiss Invoice with QR Code Generator: Magic Heidi API Documentation

example of an invoice

At Magic Heidi, we've been developing a cross platform invoicing solution for Switzerland. Our aim is to enable all Swiss IT providers and make it as easy as possible for everyone to generate invoices.

We're opening up our API to allow anyone to generate valid Swiss invoices with QR codes. This document describes our API and provides some examples to help you get started.

For any queries, please feel free to email us at hello@magicheidi.ch.

@nathanganser
nathanganser / gist:87636c31dee8869ec0bd9b46739e2ec8
Created November 6, 2023 18:29
Working function that adds calendar event to calendar (ICS / Calendar / Outlook / Gmail)
def send_appointment(attendee_email, organiser_email, subj, description, location, start_hour, start_minute):
# Timezone to use for our dates - change as needed
tz = pytz.timezone("Europe/London")
start = tz.localize(dt.datetime.combine(datetime.utcnow(), dt.time(start_hour, start_minute, 0)))
# Build the event itself
cal = icalendar.Calendar()
cal.add('prodid', '-//My calendar application//example.com//')
cal.add('version', '2.0')
cal.add('method', "REQUEST")
event = icalendar.Event()
@nathanganser
nathanganser / .deps...npm...hardhat...console.sol
Created March 21, 2023 13:44
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);
function _sendLogPayload(bytes memory payload) private view {
uint256 payloadLength = payload.length;
address consoleAddress = CONSOLE_ADDRESS;
assembly {
### Keybase proof
I hereby claim:
* I am nathanganser on github.
* I am webbiger (https://keybase.io/webbiger) on keybase.
* I have a public key ASDxOK2D3VCgGVVWpi4CO5y8fLoxtKQ5XzE5MtSxv0WeIwo
To claim this, I am signing this object: