Skip to content

Instantly share code, notes, and snippets.

-- many tomorrows
-- norns study 1
--
-- KEY 2 toggle sound on/off
-- KEY 3 toggle octave
-- ENC 2 randomize amplitude
-- ENC 3 change frequency
--
-- first turn on AUX reverb!
-- many tomorrows
-- norns study 1
--
-- KEY 2 toggle sound on/off
-- KEY 3 toggle octave
-- ENC 2 randomize amplitude
-- ENC 3 change frequency
--
-- first turn on AUX reverb!
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
URL = '<nightscout url>/api/v1/entries.json'.freeze
def index
response = JSON.parse(HTTParty.get(URL).body)
chart_data = response.map {|r| r["glucose"].to_i}
payload = {
"frames": [
{
"text": response[0]['glucose'].to_s,
"icon": 'i20045', # Blue circle logo
@mwilliams
mwilliams / gist:d6c3370a8c24d8498f92e89b9f0ff2ae
Created December 15, 2016 17:31
Flashing an Edison with jubilinux from OSX
# Connect to the Edison
sudo screen /dev/tty.usbserial-A900UH7Z 115200
# Jump into the jubilinux directory
cd /Users/mwilliams/Downloads/jubilinux
# Install the appropriate usb libraries
brew update && brew tap jlhonora/lsusb && brew install lsusb
# Run flashall from the jubilinux directory
@mwilliams
mwilliams / gist:6613649
Last active December 23, 2015 09:19
Having issues installing Elm with homebrew's haskell-platform & ghc? Here's you answer! Kudos to @dysinger for getting me in the right direction!
cabal update
cabal install Cabal
cabal install cabal-install
cabal sandbox init (in your project workspace)
cabal install elm
cabal install elm-server
sdfsdfsdfsdfsadfsdfds
(defn dispatch-generator
"Return a fn to handle a completed response."
[feed-key feed-url response-callback]
(fn [state]
(let [code (-> (c/status state) :code)
headers (c/headers state)
body (-> (c/body state) .toString)]
(response-callback feed-key
feed-url
code
dsafsdfasdfdas
Sunday:
- Ignite RailsConf
Monday:
- Hallway track (no training sessions on my ticket...)
Tuesday:
- DHH Keynote
- Michael Feathers Keynote
- Building an API with Rails