Skip to content

Instantly share code, notes, and snippets.

@claws
claws / projection_02.c
Created February 28, 2013 13:16
Avro schema projection test 02
/*
* Build using:
* gcc -Wall -std=c99 projection_02.c -o projection_02_test -I/usr/include -I$AVRO_INCLUDE_DIR -L$AVRO_LIB_DIR -lavro
*/
#include <stdlib.h>
#include <stdio.h>
#include <avro.h>
@claws
claws / projection_01.c
Last active December 14, 2015 08:19
Avro schema projection test 01
/*
* Build using:
* gcc -Wall -std=c99 projection_01.c -o projection_01_test -I/usr/include -I$AVRO_INCLUDE_DIR -L$AVRO_LIB_DIR -lavro
*/
#include <stdlib.h>
#include <stdio.h>
#include <avro.h>
@claws
claws / pyzmq_last_endpoint_test.py
Created January 12, 2013 23:06
pyzmq problem using LAST_ENDPOINT sockopt
'''
I am trying to use a wildcard port in an effort to let the OS assign
an ephemeral port. I then try to ascertain the actual endpoint by
using the LAST_ENDPOINT socket option.
This is along the lines of the suggestion here: http://lists.zeromq.org/pipermail/zeromq-dev/2012-October/018915.html
However, this does not work for me. The output below is what I get
when I run this script:
@claws
claws / weather_report.py
Created May 28, 2012 13:52
Create Your Own Weather Report Audio Track Using Current BOM Data
"""
This script retrieves weather forecast and observation
data from the Australian Bureau of Meteorology (BOM)
and converts them into a spoken word weather report
audio file.
This script was written to generate the first track for
my morning alarm clock playlist.
@claws
claws / weather_station.py
Created April 22, 2012 12:55
A Python Twisted friendly pywws Weather Station
#!/usr/bin/env python
"""
This module represents a twist-ification of the pywws Weather Station.
There was nothing wrong with the original pywws version. I just wanted a
version that would integrate consistently with my other Twisted based
software.
"""
@claws
claws / 2012-03-03-demo.md
Created March 3, 2012 13:10
Generate excerpt content in Jekyll for use on Gihub pages. This extracts the post content within the '<!-- excerpt start -->' and '<!-- excerpt end -->' comment tags.
layout title
post
Jekyll Excerpts

This text becomes the excerpt text displayed on the main page

@claws
claws / 2012-03-03-demo.md
Created March 3, 2012 07:45
A simple excerpt filter for use with Jekyll. Perhaps there are better ways but I couldn't find anything suitable. It extracts post content in between "<!-- excerpt start -->" and "<!-- excerpt end -->". Change the excerpt delimiters to suit your needs.
layout title
post
Test Post

This is a test post.

This content comes after the excerpt.