| UUID | Character | Length | Permission | Description |
|---|---|---|---|---|
| 0xFFF1 | Control | 18 | Read/Write | Control the color/light/on/off of LED |
| 0xFFF2 | Delay On/Off | 8 | Read/Write | Set delay on/off for LED |
| 0xFFF3 | Delay On/Off Status | 2 | Read/Write | Query the status of delay on/off Query |
| 0xFFF4 | Delay On/Off Status | 10 | Notify | Notify the status of delay on/off Response |
| 0xFFF5 | Status Query | 1 | Read/Write | Query the status of LED |
| 0xFFF6 | Status Response | 20 | Notify | Notify the status of LED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(0deg, yellow, #f06, red, purple); | |
| min-height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'drb/drb' | |
| DRb.start_service | |
| synth = DRbObject.new_with_uri('druby://localhost:9999') | |
| use_bpm 135 | |
| live_loop :drums do | |
| 2.times do | |
| synth.note(36,:volca_beats) | |
| sleep 0.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ~/src/scratch/manageiq/extract_provider_gem.sh \ | |
| -n ovirt \ | |
| -d "app/models/manageiq/providers/redhat spec/models/manageiq/providers/redhat spec/vcr_cassettes/manageiq/providers/redhat" \ | |
| -l \ | |
| -e ~/src/manageiq \ | |
| -r \ | |
| -g ~/src/manageiq \ | |
| -p durandom \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'thor' | |
| class_option :config, :type => :string, :aliases => "-c", :desc => "Use an alternative YAML config file." | |
| def initialize(*args) | |
| super | |
| config_files = Array.new | |
| config_files.push(options[:config]) if options[:config] | |
| config_files.push("#{ENV['XDG_CONFIG_HOME']}/awesomeness/awesomeness.yaml") if ENV['XDG_CONFIG_HOME'] | |
| config_files.push("#{ENV['HOME'] || '~'}/.config/awesomeness.yaml") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Free to use. if you modify it, pls let me know, i might need your code aswell :-) | |
| # github: krtschmr | |
| # [email protected] | |
| # USAGE | |
| # Straightforward | |
| # Sonoff.on!("192.168.1.53") | |
| # Sonoff.off!("192.168.1.53") |
These are instructions for standing up a Kubernetes cluster with Raspberry Pis with the current Hypriot (1.9.0), with K8S v1.10.5
Thanks to https://gist.github.com/alexellis/fdbc90de7691a1b9edb545c17da2d975 and https://gist.github.com/aaronkjones/d996f1a441bc80875fd4929866ca65ad for doing all the hard work!
- This was done using a cluster of 5 RPi 3 B+
- All Pi's are connected via a local ethernet switch on a 10.0.0.0/24 LAN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library | |
| import paho.mqtt.publish as publish | |
| GPIO.setwarnings(False) | |
| GPIO.setmode(GPIO.BOARD) | |
| GPIO.setup(10, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) | |
| button_on = False | |
| while True: | |
| if GPIO.input(10) == GPIO.HIGH and button_on == False: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cloud-config | |
| # vim: syntax=yaml | |
| # | |
| # The current version of cloud-init in the Hypriot rpi-64 is 0.7.9 | |
| # When dealing with cloud-init, it is SUPER important to know the version | |
| # I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had | |
| # Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html | |
| # Set your hostname here, the manage_etc_hosts will update the hosts file entries as well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/auto3000/RPi.GPIO_NP/blob/master/create_gpio_user_permissions.py | |
| import grp | |
| import subprocess | |
| def ensure_gpiogroup(): | |
| try: | |
| grp.getgrnam('gpio') | |
| except KeyError: | |
| print('GPIO group does not exist - creating...') | |
| subprocess.call(['groupadd', '-f', '-r', 'gpio']) |