Skip to content

Instantly share code, notes, and snippets.

View istepaniuk's full-sized avatar

Iván Stepaniuk istepaniuk

View GitHub Profile
@onderweg
onderweg / inkbird.js
Last active December 7, 2023 09:50
Read temperature and humidity data from Inkbird ibs-TH1.
const DATA_HND = 0x002d;
const parseData = (data) => {
const rawTemp = data.readInt16LE(0);
const rawHum = data.readInt16LE(2);
return {
temperature: rawTemp / 100,
humidity: rawHum / 100
}
}
@clsr
clsr / 1288.user.js
Last active December 27, 2015 19:19
Implementation of http://xkcd.com/1288/ as a userscript
// ==UserScript==
// @name xkcd 1288 substitutions
// @namespace http://github.com/mcef
// @description Substitutions that make reading the news more fun
//
// @include http://www.bbc.com/*
// @include http://www.cbc.ca/*
// @include http://www.theguardian.com/*
// @include http://www.telegraph.co.uk/*
// @include http://www.theonion.com/*
@rantav
rantav / README.md
Created August 23, 2012 06:13
Find slow queries in mongo DB

A few show tricks to find slow queries in mongodb

Enable profiling

First, you have to enable profiling

> db.setProfilingLevel(1)

Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...