Skip to content

Instantly share code, notes, and snippets.

@freeekanayaka
freeekanayaka / oximeter-ha.go
Last active May 31, 2020 05:37
Sample pulse oximeter with Dqlite and Go
package main
import (
"context"
"database/sql"
"fmt"
"io"
"log"
"math/rand"
"net/http"
@freeekanayaka
freeekanayaka / oximeter.go
Created January 28, 2020 15:18
Sketch pulse oximeter with SQLite and Go
package main
import (
"database/sql"
"fmt"
"io"
"log"
"math/rand"
"net/http"
"time"
@freeekanayaka
freeekanayaka / gist:1773008
Created February 8, 2012 20:16
Context routes tests
import unittest
from zope.interface import providedBy
from pyramid import testing
from pyramid.interfaces import IRequest, ITraverser
from pyramid_contextroutes import (
ContextRoutes, route, ContextRoutesTraverser, IContextRoutes)
@freeekanayaka
freeekanayaka / gist:1772990
Created February 8, 2012 20:15
Context routes spike
import sys
from zope.interface import Interface, implementer
from pyramid.interfaces import ITraverser
from pyramid.urldispatch import Route
from pyramid.traversal import traversal_path_info
ROUTES_ATTRS = "__routes__"