Skip to content

Instantly share code, notes, and snippets.

View jmbwell's full-sized avatar

John Burwell jmbwell

  • Houston, Texas
View GitHub Profile
@dhowland
dhowland / ambientweather_telegraf.md
Last active January 26, 2024 22:27
Telegraf config for AmbientWeather API

This is the most straightforward config for parsing the Ambient Weather API into a time series database with Telegraf. I use InfluxDB to store the data and Grafana to view the data.

Note that this is not a complete Telegraf config. What follows is a fragment that you would add to the bottom of your telegraf.conf file. You must set up Influx yourself.

You MUST replace the xxxxxxxx strings in the urls parameter with your personal Application key and API key. See https://www.ambientweather.com/api.html for help if you don't have your keys.

The measurement name can be set to anything you want with the name_override parameter.

The devices endpoint gives data for all weather stations associated with your account, but this config simply takes the first one. This is done with the json_query = "0.lastData" line. Other devices could be selected by changing the 0 to another number. Properly handling multiple weather stations is too complex for any sane config of the http plugin for Telegraf. Hard

#!/bin/sh
# default commands for osx to make it nicer to work with
##########################
# General UI?UX settings #
##########################
# Set hostname (hex of MVB9APPS)
sudo scutil --set ComputerName "0x4d56423941505053"
sudo scutil --set HostName "0x4d56423941505053"
@meain
meain / loading_messages.js
Last active April 27, 2024 09:54
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
@gozoinks
gozoinks / gist:c7708c6b9907acd86384a1d76f26cec1
Last active January 6, 2022 14:23
Monit on pfsense 2.4 ARM (SG-1000)
# Monit on pfSense 2.4 ARM (SG-1000)
# Install the package from the FreeBSD repository
pkg add http://pkg.freebsd.org/FreeBSD:11:armv6/latest/All/monit-5.18.txz
# Rename the rc.d script to .sh and fix permissions so pfSense will start it automatically
mv /usr/local/etc/rc.d/monit /usr/local/etc/rc.d/monit.sh
chmod 0755 /usr/local/etc/rc.d/monit.sh
# Add monit_enable=YES to a local rc.conf
@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active April 19, 2024 16:03
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)