Skip to content

Instantly share code, notes, and snippets.

mike fettis ridingintraffic

Block or report user

Report or block ridingintraffic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am ridingintraffic on github.
  • I am ridingintraffic (https://keybase.io/ridingintraffic) on keybase.
  • I have a public key whose fingerprint is B373 055B 724E C1BA 92BA D90A 4481 E6C9 4946 E550

To claim this, I am signing this object:

View jenkins_beacons.ino
#include <RCSwitch.h>
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiClient.h>
#include <ESP8266HTTPClient.h>
#include <PubSubClient.h>
RCSwitch mySwitch = RCSwitch();
View opsbot_snippets.js
module.exports = function (req, res, next) {
var userName = req.body.user_name;
var words = req.body.text;
var channel = req.body.channel_name;
var trigger = req.body.trigger_word;
var mqtt = require('mqtt')
var client = mqtt.connect('mqtt:111.22.33.44')
var botPayload
var words = words.toLowerCase();
var splunkBunyan = require("../index");
View opsbot_beaconsOfJenkins
Splunk Blog about arduino and http collectors:
http://blogs.splunk.com/2015/10/23/splunking-sensor-data-with-arduino-and-http-event-collector/
Splunk docker logging driver
https://docs.docker.com/engine/admin/logging/splunk/
http://blogs.splunk.com/2015/12/16/splunk-logging-driver-for-docker/
Arduino Huzzah esp8266 microcontrollers with embedded wifi
https://www.adafruit.com/products/2471
View rfsniffer.ino
/*
RF_Sniffer
Hacked from http://code.google.com/p/rc-switch/
by @justy to provide a handy RF code sniffer
*/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
View ansible-lab
- name: "Set up authorized_keys for the root user"
hosts: pi
user: pi
tasks:
- name: Create new ssh key-pair
local_action: command ssh-keygen -t rsa -N "" -q -f ~/test/id_rsa
@ridingintraffic
ridingintraffic / emu.py
Last active Oct 5, 2018
rainforest automation python script
View emu.py
#!/usr/bin/env python
from raven import raven
from raven import _version
import argparse
import logging as log
from splunk_hec_handler import SplunkHecHandler
#splunk hec collector info
token = "<your splunk token>"
splunkhost="<your splunk ip>"
View emu.service
[Unit]
Description=emu power
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/home/pi/emu.py
[Service]
WorkingDirectory=/home/pi
User=pi
View gist:df6bf2f9b3a6e5c036402e69da8321bf
{
event: {
demand: 0.882
divisor: 1000
multiplier: 1
raw_demand: 882
timestamp: 2018-10-04T23:30:49Z
}
host: gate
index: default
View snippet
chmod +x /home/pi/emu.py # setting the python script to executable
cp emu.service /etc/systemd/system # copy the service template
sudo systemctl daemon-reload # systemd refresh the system folder for templates
sudo systemctl enable emu.service # install and enable the service
sudo systemctl start emu.service # start it up!
sudo systemctl status emu # did it work?
You can’t perform that action at this time.