Skip to content

Instantly share code, notes, and snippets.

View seppestas's full-sized avatar

Seppe Stas seppestas

View GitHub Profile
// Module to talk to the SHT21 temperature and humidity sensor over I2C
var i2c = require('i2c');
// Register addresses
const TRIGGER_T_MEASUREMENT_NO_HOLD = 0xF3;
const TRIGGER_RH_MEASUREMENT_NO_HOLD = 0xF5;
const WRITE_USER_REGISTER = 0xE6;
const READ_USER_REGISTER = 0xE7;
const SOFT_RESET = 0xFE;
package stuff
import (
"github.com/stretchr/testify/mock"
"testing"
)
// Interface to mock
type Stuff interface {
DoThings(fu, bar string) (string, error)

Keybase proof

I hereby claim:

  • I am seppestas on github.
  • I am seppestas (https://keybase.io/seppestas) on keybase.
  • I have a public key whose fingerprint is 1EEA B396 EECA 267E 0F5B 6C2E FECE AA3E ECF4 C38F

To claim this, I am signing this object:

@seppestas
seppestas / # gst-plugins-bad - 2016-05-09_10-35-17.txt
Created May 9, 2016 09:00
gst-plugins-bad on Mac OS X 10.11.4 - Homebrew build logs
Homebrew build logs for gst-plugins-bad on Mac OS X 10.11.4
Build date: 2016-05-09 10:35:17
@seppestas
seppestas / awslambda.mk
Last active February 12, 2017 19:40
AWS Lambda deployment package maker
# Copyright (c) Productize
# This is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3
# as published by the Free Software Foundation.
# You can get the license at <http://www.gnu.org/licenses/gpl.html>
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@seppestas
seppestas / gist:f7fd26b54104c30a848f
Created June 29, 2015 12:39
Network discovery Opera
navigator.getNetworkServices(['upnp:urn:schemas-upnp-org:service:ContentDirectory:1',], function(serviceList) {console.log('got services: '); console.log(serviceList); }, function(e) {console.log('error:' + e.message);} )
@seppestas
seppestas / Tmux mouse-mode
Created April 9, 2013 10:10
Lines to put in .tmux.conf to turn on mouse-mode. This allows you to use the mouse (and touchscreens) to select the active window, navigate in the window,...
# Turn mouse-mode on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'