This file contains 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 ruby | |
# | |
# eg: graphite-calc.rb 10s:10d,5m:400d,24h:20y 20 | |
# to calculate sizing for 20 hosts, 1000 metrics per host, 10s metric update interval | |
# | |
graphite_policy = ARGV.shift | |
num_hosts = ARGV.shift || 1 | |
num_metrics = ARGV.shift || 1000 | |
update_interval = ARGV.shift || 10 |
This file contains 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
sudo apt-get install arduino-core arduino-mk | |
sudo apt-get install screen | |
sudo apt-get install git | |
cd /usr/share/arduino/libraries | |
sudo git clone https://github.com/adafruit/Adafruit_NeoPixel.git |
This file contains 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
void send_38khz_pulse(void) { | |
PORTB ^= irOut; | |
PORTB ^= redMask; | |
delay_x_us(26); // 17 works | |
} | |
void send_38khz_space(void) { | |
PORTB ^= bogusMask; | |
PORTB ^= bogusMask; | |
delay_x_us(26); // 17 works |
This file contains 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
diff --git a/lib/mcollective/util.rb b/lib/mcollective/util.rb | |
index abd5791..6870709 100644 | |
--- a/lib/mcollective/util.rb | |
+++ b/lib/mcollective/util.rb | |
@@ -55,10 +55,19 @@ module MCollective | |
# If the passed value starts with a / it's assumed to be regex | |
# and will use regex to match | |
def self.has_fact?(fact, value) | |
- value = Regexp.new(value.gsub("\/", "")) if value.match("^/") | |
- |
NewerOlder