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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<head> | |
<title>Runs by date</title> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<style> | |
.Blues .q0-3{fill:rgb(222,235,247)} | |
.Blues .q1-3{fill:rgb(158,202,225)} | |
.Blues .q2-3{fill:rgb(49,130,189)} | |
.Blues .q0-4{fill:rgb(239,243,255)} |
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
#!/opt/rh/ruby193/root/usr/bin/ruby | |
# -*- encoding: utf-8 -*- | |
# | |
# mqtt & influxdb sample... | |
# | |
# libraries | |
# $ gem install mqtt | |
# $ gem install influxdb | |
# | |
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
require 'mqtt' | |
require 'solareventcalculator' | |
require 'json' | |
class LocationBasedSunrise | |
Version = '0.0.1' | |
def initialize(arguments, stdin) | |
@client = MQTT::Client.new('mqtts://sharkbaitextraordinaire.com:8883', :ssl => :TLSv1) |
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 yum install wget mercurial cmake openssl-devel c-ares-devel libuuid-devel | |
wget https://github.com/warmcat/libwebsockets/archive/v2.1.0.tar.gz | |
tar xf v2.1.0.tar.gz | |
cd libwebsockets-2.1.0 | |
mkdir build; cd build | |
cmake .. -DLIB_SUFFIX=64 | |
sudo make install | |
echo "/usr/local/lib64" | sudo tee -a /etc/ld.so.conf.d/libwebsockets.conf | |
sudo ldconfig | |
ldconfig -p | grep libwebsockets |
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
#!/opt/rh/ruby193/root/usr/bin/ruby | |
# -*- encoding: utf-8 -*- | |
# | |
# mqtt & influxdb sample... | |
# | |
# libraries | |
# $ gem install mqtt | |
# $ gem install influxdb | |
# $ gem install logger | |
# |
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
require 'mqtt' | |
require 'json' | |
require 'net/http' | |
require 'uri' | |
require 'nokogiri' | |
require 'yaml' | |
require 'bigdecimal' | |
# a handy set of test lat/long coords: 45.522351, -122.680826 |
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
Go to https://takeout.google.com/settings/takeout | |
"Select None" | |
Scroll down to "Location History" and select that | |
Scroll to the bottom, click next, and download the file | |
Extract the LocationHistory.json | |
Convert the start and end times that you're interested in to milliseconds since epoch (epoch * 1000) and use them in the comparisons below | |
Use this jq filter pipeline to match only the timestamps that are within the selected time range, and export that to a file | |
jq '{"locations" : .locations | map(select(.timestampMs | tonumber >= 1458889200000)) | map(select(.timestampMs | tonumber <= 1459796400000)) }' Takeout/Location\ History/LocationHistory.json > trip.json |
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 python3 | |
""" | |
This script takes as input a list of image IDs from image table and | |
uses the Pillow python library to determine the height and width | |
of each image. Indicate if the image is larger than a configured pixel limit. | |
""" | |
from argparse import ArgumentParser | |
import os | |
import sys |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>tripmapper</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css" /> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<style media="screen" type="text/css"> |
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 | |
require 'mqtt' | |
require 'json' | |
require 'yaml' | |
require 'bigdecimal' | |
require 'logger' | |
require 'SSD1306' | |
require 'rufus-scheduler' |
OlderNewer