Skip to content

Instantly share code, notes, and snippets.

shortjared /
Last active Aug 29, 2015
Telegraf-Ubuntu-InfluxDB Notes

Ubuntu (Because Ubuntu is life)

Install Current Version of Influx DB As of writing... 0.9

sudo dpkg -i influxdb_latest_amd64.deb 
shortjared /
Created Jun 23, 2015
S3 Sourced Config Example
apt-get install -y zip unzip && \
curl "" -o "" && \
unzip && \
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
shortjared /
Created Jul 19, 2015
InfluxDB - Ubuntu Install / Setup (as of V0.9.1)

Get and Install Latest Version of InfluxDb

sudo dpkg -i influxdb_0.9.1_amd64.deb

Add influx to path, because package install doesn't do it for some stupid reason

shortjared / server.rb
Last active Dec 21, 2015
A simple example of continuously reading from a serial based device and using websockets to send data to all registered clients on the server.
View server.rb
# coding: utf-8
require 'sinatra'
require 'sinatra-websocket'
require 'serialport'
set :server, 'thin'
set :sockets, []
## Setup to read from your device via serial port
ser ="/dev/your_device", 9600, 8, 1, SerialPort::NONE)
shortjared / RecipeApi.php
Last active Dec 30, 2015
API for Recipe Website, user validation.
View RecipeApi.php
class RecipeApi extends \Restful {
// /**
// * Don't wrap output in `{"success":bool,"data":"..."}`.
// */
var $wrap = false;
// /**
// * Create a new recipe or ingredient.

Keybase proof

I hereby claim:

  • I am shortjared on github.
  • I am jshort ( on keybase.
  • I have a public key ASBPLqR8Mvup923TTaN06a7nnjghxddDT7SE1uB3vQtJNQo

To claim this, I am signing this object:

View algolia-sync.rb
#!/usr/bin/env ruby
require 'json'
require 'algoliasearch'
# Copy the algolia from prior commit to a tmp file for comparison
`git show $(git rev-parse HEAD~1):algolia.json > old-algolia.json`
current_algolia = JSON.parse('algolia.json'))
old_algolia = JSON.parse('old-algolia.json'))
shortjared / aws-lambda-cron-webhooks.js
Last active Jun 2, 2017
AWS Lambda Scheduled Webhook Calls
View aws-lambda-cron-webhooks.js
const http = require('http');
const https = require('https');
var webhookURLs = {
// Every minute
'* * * * *': [
// Every half hour
shortjared / serverless.yml
Created Jun 15, 2017
sensitive env vars passed as params
View serverless.yml
# serverless.yml
name: myService
awsKmsKeyArn: arn:aws:kms:us-east-1:XXXXXX:key/some-hash # Optional KMS key arn which will be used for encryption for all functions
frameworkVersion: ">=1.0.0 <2.0.0"
name: aws
View test-animation.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.