Skip to content

Instantly share code, notes, and snippets.

ieb / BME280.js
Last active Jan 22, 2022
Test Code for eBay BME280 order number 21-08080-91109 item 353751582230 from seller fiee-ki
View BME280.js
var i2c = require('i2c-bus');
// Also works with BMP280 but returns 0 for humidity since that chip doesnt have humidity
var BME280 = function(options) {
options = options || {};
this.bus = (options.bus===undefined)?1:options.bus;
this.debug = options.debug || false;
ieb /
Last active Jan 31, 2020
RedirectResolver proposal
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
ieb /
Created Sep 29, 2017
Configuring OAK-6575

This Gist contains information on how to Configure OAK-6575 to serve binary content direct from Oak via CloudFront, where the content is hosted in S3.

The provisioning model oak.txt in this Gist shows configuration.


  • The deployment will be TarMK or MongoMK with a S3 DataStore.
  • Whoever is configuring needs root access to the AWS subscription to manage the keys in AWS.


ieb / mongodb.conf
Created Jan 31, 2017
Modified Ganglia MongoDB WT configuration.
View mongodb.conf
modules {
module {
name = "mongodb"
language = "python"
param server_status {
value = "mongo --quiet --eval 'printjson(db.serverStatus())'"
param rs_status {
value = "mongo --quiet --eval 'printjson(rs.status())'"
ieb /
Created Jan 31, 2017
Modifed Ganglia Python module for MongoDB WT
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# MongoDB gmond module for Ganglia
# Copyright (C) 2011 by Michael T. Conigliaro <mike [at] conigliaro [dot] org>.
# All rights reserved.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
ieb /
Created Jul 29, 2016
Sling Configuration spec

Sling Configuration Bundle.

This bundle provides a service API that may be used by components to interact with configuration. The bundle merges the work started in and AEM Config Manager. For information on the API see sub projects contained within this source code tree. This file documents the semantic structure of configuration giving examples of how that configuration is persisted in the repository and in files.


This document has been created to clarifiy and define precisely what is meant by various configuration related concepts. It is a live document, intended to be changed to support a shared understanding and eliminate confusion. It does not attept to define the Java APIs. For more detail on Java APIs or implementation look at the source code.

ieb /
Last active Mar 24, 2021
Displaying AIS Data on Google Maps using the Google Maps API
#!/usr/bin/env python
# A Python AIVDM/AIVDO decoder
# This file is Copyright (c) 2010 by the GPSD project
# BSD terms apply: see the file COPYING in the distribution root for details.
# This decoder works by defining a declarative pseudolanguage in which
# to describe the process of extracting packed bitfields from an AIS
# message, a set of tables which contain instructions in the pseudolanguage,
ieb / gist:1374825
Created Nov 17, 2011
Dumb Simple Slow Luhn Test.
View gist:1374825
// A very simple Luhn check that only accepts sequence of digits as input.
// it scans the entire string with windows of 14,15,16 in width looking for a sequence that passes
// the luhn check. If it finds one it prints the original and the masked sequence, returning the
// masked sequence. If none are found, the original is returned.
// This is a dumb, slow, checker only intended to validate test sequences more quickly than doing
// manually. It outputs the progress to allow human validation.
public static String dumbSlowChecker(String test) {
char[] c = test.toCharArray();
ieb / workflow.xsd
Created Aug 1, 2011
Example XSD for transformation
View workflow.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace=""
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:element name="Activities" xsd2hbm:action="set" xsd2hbm:targetclass="Activity" >
<xsd:element ref="xpdl:Activity" minOccurs="0" maxOccurs="unbounded"/>
ieb / xsd2hbm.xsl
Created Aug 1, 2011
Transform to generate HBM files from a XSD
View xsd2hbm.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="" version="1.0"
xmlns:xpdl="" xmlns:xsd=""
exclude-result-prefixes="xpdl xsd2hbm xsd xsl">
<xsl:output doctype-public="-//Hibernate/Hibernate Mapping DTD 3.0//EN"
doctype-system="" />
<xsl:param name="tableprefix">wf</xsl:param>
<xsl:param name="package"></xsl:param>
<xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz</xsl:variable>