Skip to content

Instantly share code, notes, and snippets.

View matthiaseisen's full-sized avatar

Matthias Eisen matthiaseisen

View GitHub Profile
import graphviz as gv
g1 = gv.Graph(format='svg')
g1.node('A')
g1.node('B')
g1.edge('A', 'B')
print(g1.source)
# The MIT License (MIT)
#
# Copyright (c) 2014 Matthias Eisen (http://www.matthiaseisen.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@matthiaseisen
matthiaseisen / contact.html
Last active December 17, 2015 18:59
You are probably already familiar with the possibility of hosting static website on Amazon S3. If you're not you should read this great tutorial by Chad Thompson: http://chadthompson.me/2013/05/06/static-web-hosting-with-amazon-s3/. One common problem is that while being static your website still needs a contact form. Here's a solution for this …
<!-- You are probably already familiar with the possibility of hosting static websites on Amazon S3.
If not you should read this great tutorial by Chad Thompson: http://chadthompson.me/2013/05/06/static-web-hosting-with-amazon-s3/.
One common problem is that while being static your website still needs a contact form.
Here's a solution for this problem using Newman API (http://www.newmanapi.com). -->
<html>
<body>
<!-- First we set the 'action' attribute of <form> to point to Newman API -->
<form method="post" action="http://submit.newmanapi.com/" >
<!-- Now we create our input elements as we would in any other form -->
@matthiaseisen
matthiaseisen / contactDates2Calendar.js
Created September 21, 2012 14:21
Google Apps Script: how to create calendar events from contact's dates
// This script uses the underscoreGS library: https://sites.google.com/site/scriptsexamples/custom-methods/underscoregs
var MONTHS = [ ContactsApp.Month.JANUARY,
ContactsApp.Month.FEBRUARY,
ContactsApp.Month.MARCH,
ContactsApp.Month.APRIL,
ContactsApp.Month.MAY,
ContactsApp.Month.JUNE,
ContactsApp.Month.JULY,
ContactsApp.Month.AUGUST,