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 "red_storm" | |
require "bunny" | |
require "thread" | |
# Storm spout with a non-blocking RabbitMQ connection | |
class YourSpout < RedStorm::DSL::Spout | |
output_fields :your_field_name | |
QUEUE_NAME = "your.queue.name" | |
on_init {@q, @bunny = Queue.new, detach_bunny} |
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
--- | |
- name: Generate public/private SSH keys for an existing user (will not overwrite existing keys) | |
user: | |
name: root | |
generate_ssh_key: yes | |
ssh_key_bits: 2048 | |
ssh_key_file: /root/.ssh/id_rsa | |
state: present | |
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
// Add custom Events to javascript objects in the browser with a Node.js style syntax | |
// https://gist.github.com/alextaujenis/0dc81cf4d56513657f685a22bf74893d | |
// Copyright 2018 Alex Taujenis | |
// MIT License | |
class Events { | |
constructor () { | |
this._callbacks = {} | |
} |
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
// Arduino Whack-a-mole game. | |
// Copyright 2018 Alex Taujenis | |
// MIT License | |
#include <RBD_Timer.h> // https://github.com/alextaujenis/RBD_Timer | |
#include <RBD_Light.h> // https://github.com/alextaujenis/RBD_Light | |
#include <RBD_Capacitance.h> // https://github.com/alextaujenis/RBD_Capacitance | |
#include <RBD_Threshold.h> // https://github.com/alextaujenis/RBD_Threshold | |
#include <RBD_HumanSensor.h> // https://github.com/alextaujenis/RBD_HumanSensor |