Skip to content

Instantly share code, notes, and snippets.

View ccutrer's full-sized avatar

Cody Cutrer ccutrer

View GitHub Profile
@ccutrer
ccutrer / doorbird.items
Last active July 30, 2019 17:38
DoorBird motion and ring notifications
Contact Doorbird_Contact "Doorbell" { expire="30s" }
@ccutrer
ccutrer / _api.txt
Last active December 9, 2023 01:57
EverLights API
The app always sends a nocache param, which appears to be time since the app launched. It's ignored by the control box.
Color is just RGB. 255,255,255 = 0xffffff. 0,255,0 = 0x00ff00
Modes:
all modes can take a value between 0-255. only one of tw, cf, cr, wi, ra can be set at once
tw: twinkle
fa: fade
bl: blink
#!/usr/bin/env ruby
require 'timeout'
trap(:CHLD) { }
x = 0
while true
puts "loop #{x += 1}"
pid = Process.spawn('sleep 1')
[metastore] 2015/08/26 11:44:57 Using data dir: /var/opt/influxdb/meta
[metastore] 2015/08/26 11:44:57 Skipping cluster join: already member of cluster: nodeId=1 raftEnabled=true peers=[127.0.0.1:8088]
[metastore] 2015/08/26 11:44:57 [INFO] raft: Node at 127.0.0.1:8088 [Follower] entering Follower state
[metastore] 2015/08/26 11:44:57 Node at 127.0.0.1:8088 [Follower]
[store] 2015/08/26 11:44:57 Using data dir: /var/opt/influxdb/data
[handoff] 2015/08/26 11:44:58 Starting hinted handoff service
[handoff] 2015/08/26 11:44:58 Using data dir: /var/opt/influxdb/hh
[tcp] 2015/08/26 11:44:58 Starting cluster service
[snapshot] 2015/08/26 11:44:58 Starting snapshot service
[admin] 2015/08/26 11:44:58 Starting admin service
[metastore] 2015/08/26 10:06:13 Using data dir: /var/opt/influxdb/meta
[metastore] 2015/08/26 10:06:13 Skipping cluster join: already member of cluster: nodeId=1 raftEnabled=true peers=[127.0.0.1:8088]
[store] 2015/08/26 10:06:13 Using data dir: /var/opt/influxdb/data
[metastore] 2015/08/26 10:06:13 Node at 127.0.0.1:8088 [Follower]
[metastore] 2015/08/26 10:06:13 [INFO] raft: Node at 127.0.0.1:8088 [Follower] entering Follower state
[handoff] 2015/08/26 10:06:15 Starting hinted handoff service
[handoff] 2015/08/26 10:06:15 Using data dir: /var/opt/influxdb/hh
[tcp] 2015/08/26 10:06:15 Starting cluster service
[shard-precreation] 2015/08/26 10:06:15 Starting precreation service with check interval of 10m0s, advance period of 30m0s
[snapshot] 2015/08/26 10:06:15 Starting snapshot service
@ccutrer
ccutrer / dup_namespace.rb
Created February 19, 2015 23:26
Nokogiri under jruby fails to create namespaces named the same as a sibling
#!/usr/bin/env ruby
require 'nokogiri'
d = Nokogiri::XML::Document.new
e1 = d.create_element('e', 'xmlns:foo' => 'fooey')
e2 = d.create_element('e', 'xmlns:foo' => 'fooey')
puts "namespace_definitions should not be empty, but it is"
puts e2.namespace_definitions.inspect