Skip to content

Instantly share code, notes, and snippets.

View gerwin3's full-sized avatar

Gerwin van der Lugt gerwin3

View GitHub Profile
@gerwin3
gerwin3 / README.md
Last active January 23, 2021 16:37
Generate skeleton project for C++17 project

Automated creation of C++ project structure

From time to time I find myself manually creating a directory structure for my new C++ project. Usually, you will start by defining the program architecture, then continue to create header and source files for each of the classes, add include guards, add namespaces and much more. Why do this from scratch every time?

This little script takes a "tree" file as input, and then generates the entire source tree for you! It includes:

  • CMakeLists.txt
    • With settings for C++17
  • Correct source_group structure
@gerwin3
gerwin3 / make-vcard.py
Created January 23, 2021 16:16
Generate vCard using Python
"""
This little script can generate a valid .vcf (vCard). It will ask you to fill
in some details and write the vcf-file.
"""
def main():
print('Please enter contact details:')
first_name = input(' - First name : ')
last_name = input(' - Last name : ')
email = input(' - E-mail address : ')
@gerwin3
gerwin3 / watermark-north.py
Created July 22, 2017 10:41
Python - Drawing True North line on equirectangular picture based on GPano:PoseHeadingDegrees
#
# Dependencies:
# - pip install Pillow (easy_install Pillow works as well)
#
import os
import xml.etree.ElementTree as ET
from PIL import Image, ImageDraw, ImageFont