Skip to content

Instantly share code, notes, and snippets.

View ball-hayden's full-sized avatar

Hayden Ball ball-hayden

View GitHub Profile
#!/bin/sh
# Requires GNU time (gtime)
gtime -v ruby faraday-memory-leak.rb 2> /tmp/benchmark
cat /tmp/benchmark | grep "Maximum resident set size"
@ball-hayden
ball-hayden / sprockets_timer.rb
Created July 13, 2017 14:31
Timed Sprockets Load
module TimedSprocketsLoad
def load(uri)
result = nil
time = Benchmark.realtime do
result = super
end
if time > 0.5
Rails.logger.info "[Sprockets Time] #{time}s \t Loaded #{uri}"
@ball-hayden
ball-hayden / README
Last active October 21, 2021 10:26
ECG Capture and Analysis using Photon, Biosppy and InfluxDB
This was a test for a bit of fun one evening.
Data captured using https://www.sparkfun.com/products/12650 connected to one of the photon's ADC pins.
Data is forwarded (in bursts) via TCP to a python script, and forwarded to InfluxDB.
Biosppy is run every second on data received to extract heartrate, which is also sent to InfluxDB.

Keybase proof

I hereby claim:

  • I am ball-hayden on github.
  • I am haydenball (https://keybase.io/haydenball) on keybase.
  • I have a public key whose fingerprint is B089 8232 A46B AFA7 803E 036C EE51 B0E4 D42D 05F0

To claim this, I am signing this object:

@ball-hayden
ball-hayden / README.md
Last active September 21, 2018 09:07
ActiveAdmin Bootstrap

ActiveAdmin Bootstrap

This is a rough proof of concept.

There will be broken things.

Comments are welcome.

Installation