Skip to content

Instantly share code, notes, and snippets.

@Loupi
Loupi / nested-redis.rb
Created May 22, 2012 01:54
Redis Nested Comments in Ruby
require 'redis'
require 'json'
class CommentsRepository
def initialize
@redis = Redis.new
end
def save(itemId, comment, parentId = nil)
@bengotow
bengotow / RubyMotion_Setup.md
Last active December 17, 2015 04:39
Living document with information about adding the Spark Inspector framework into a RubyMotion project

###Add the Spark Inspector to a RubyMotion Project

Please give these instructions a try and let me know how it goes - it should be possible to get the Spark Inspector working. I don't own a copy of RubyMotion yet, but I identified the vendor_project options I think you'll need to include and link the Inspector's framework into your app.

UPDATE: @tbdr has confirmed that the instructions below work. Feel free to comment below if you discover issues!

UPDATE 2: @tbdr has published a gem motion-sparkinspector to make this easier. Source available https://github.com/TBD/motion-sparkinspector.

  1. Download the Spark Inspector from http://www.sparkinspector.com/
@arfoll
arfoll / shelly_gen2_mqtt.yaml
Created December 5, 2021 14:13
shelly gen 2 mqtt
## configuration.yaml
automation: !include automation.yaml
switch: !include switches.yaml
binary_sensor: !include binary_sensors.yaml
sensor: !include sensors.yaml
## automation.yaml
- id: shellies_get_status
alias: Shellies Get Status
description: ''