Skip to content

Instantly share code, notes, and snippets.

View Bwooce's full-sized avatar

Bruce Fitzsimons Bwooce

  • Sydney, Australia
View GitHub Profile
@codyc1515
codyc1515 / Goodnature A24 Rat & Stoat Trap - Chirp BLE Protocol.md
Last active June 27, 2024 03:58
Goodnature A24 Rat & Stoat Trap - Chirp BLE Protocol

Introduction

Goodnature is a New Zealand based manufacturer of humane traps. Their model A24 trap targets Rat & Stoats. The device is triggered when a pest brushes past an activation pin. This causes the striker to activate instantly using the power of a small, replacable CO2 gas canister.

The device is also available with an optional visual counter or a Bluetooth Low Energy (BLE) enabled device and companion app, named Chirp. This gist aims to document some of the more technical details of the Goodnature A24 Chirp device (such as the BLE Services and Characteristics) which are not immediately clear from the support website.

How it works

  • The app requires "Always"-On location permission to detect when the user is near the trap. When near the trap, the app will then listen for BLE beacons from the Chirp.
  • Only one device using the app can connect to the Chirp at any time. When the device disconnects from the Chirp, it goes back to "sleep" again and must be "woken".
  • Because the Chirp does not have Wi
@awly
awly / gist:5403749
Last active December 16, 2015 08:09
No more memory problems!
func assistGC(t uint64) {
for {
runtime.GC()
time.Sleep(t)
go assistGC(t + 1)
}
}
func main() {
runtime.GOMAXPROC(runtime.NumCpu())
#!/bin/python
# Download DaVinci's Notebook from http://www.bl.uk/manuscripts/FullDisplay.aspx?ref=Arundel_MS_263
#
# Format is:
# http://www.bl.uk/manuscripts/Proxy.ashx?view=arundel_ms_263_<page_number>_files/<resolution_level>/<column>_<row>.jpg
#
# Pages work in this fashion: f001r, f001v, f002r, f002v, f003r, f003v, ... and ends at f283v.
# At resolution 14, columns range from 0 to 33 and rows range from 0 to 24.
anonymous
anonymous / db.go
Created January 24, 2012 17:39
Go SDK for Dropbox
package dropbox
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"strconv"