Skip to content

Instantly share code, notes, and snippets.

View carelvwyk's full-sized avatar

Carel van Wyk carelvwyk

View GitHub Profile
@carelvwyk
carelvwyk / test
Created September 25, 2018 15:23
test
alert(1);
@carelvwyk
carelvwyk / email.go
Created February 22, 2018 12:40
Building an email in Golang to be delivered using Amazon SES
func buildEmailInput(source, destination, subject, message string,
csvFile []byte) (*ses.SendRawEmailInput, error) {
buf := new(bytes.Buffer)
writer := multipart.NewWriter(buf)
// email main header:
h := make(textproto.MIMEHeader)
h.Set("From", source)
# Converts a Root.co.za CSV export of outgoing transactions
# into a format that can be imported into Google Maps
import csv
from datetime import datetime
# Parse:
with open('rootexport.csv') as data:
rdr = csv.DictReader(data)
transactions = [(

Keybase proof

I hereby claim:

  • I am carelvwyk on github.
  • I am carelvanwyk (https://keybase.io/carelvanwyk) on keybase.
  • I have a public key whose fingerprint is 85FD 3AA5 2793 1816 9659 1644 4E65 FA16 2E32 0B68

To claim this, I am signing this object:

@carelvwyk
carelvwyk / album_export.py
Created November 2, 2013 12:02
Python script to export tagged albums purchased in iTunes on an iPhone to PC. The script will rename purchased tracks from the strange 4837260613109701064.m4a format to human-readable filenames in the form: album artist/album title (year)/trackno - artist - track title.m4a (e.g. 01 - Rammstein - Sonne.m4a). It will also embed the cover art and a…
OUT_DIR = './out'
GROUP_KEY = 'playlistName' # playlistName -> Album Title
# get list of plist files:
import os
import glob
import shutil
import biplist
import mutagen
from mutagen import mp4