Skip to content

Instantly share code, notes, and snippets.

View chrowe's full-sized avatar

Chris Rowe chrowe

View GitHub Profile
#!/bin/bash
SET=35
echo "$SET" > "./set.txt"
IN=`/data/opk-1-wire-cli/pull -p 041471b7f4ff -s f -r`
OUT=`/data/opk-1-wire-cli/pull -p 041471b95dff -s f -r`
#echo "IN = "$IN
#echo "OUT = "$OUT
@chrowe
chrowe / autorun.sh
Last active August 29, 2015 14:26
OPK water temps
#!/bin/bash
cd /root
watch -n600 "./opk-temper1-cli/pull --scale farenheit | ./opk-wrap/wrap -s JSON -k temp | ./opk-phant-json/push ; ./opk-1-wire-cli/pull --path 041471d2a2ff --scale fahrenheit | ./opk-cli--phant/push --public_key VGAXp1b2bgtmVJK9JqMJ --private_key 9YAg2kBaBZTk8oa4ovwo --url data.sparkfun.com --field_name temp"
@chrowe
chrowe / autorun.sh
Last active August 29, 2015 14:26 — forked from treehouse-su/autorun.sh
temper1 OPK script
#!/bin/sh
# configure pirateship image
sudo pirateship rename temper
sudo pirateship adapter pirate.sh/ip "" none
# install opk drivers
# NOTE: must manually copy phant 'keys_*.json' file to /boot directory
cd /root
mkdir drivers
git clone https://github.com/openpipekit/opk-temper1-cli.git
git clone https://github.com/openpipekit/opk-phant-cli.git
./drivers/opk-temper1-cli/install
sudo ./drivers/opk-temper1-cli/detect
sudo ./drivers/opk-temper1-cli/pull --path 0001:0005:01 --scale farenheit
@chrowe
chrowe / monitor.py
Created April 6, 2015 04:08
1 Wire scripts
#!/usr/bin/env python
import sqlite3
import os
import time
import glob
# global variables
speriod=(15*60)-1
@chrowe
chrowe / log
Created March 9, 2015 01:29
OPK install
pi@temper4 ~ $ wget http://node-arm.herokuapp.com/node_0.10.36_armhf.deb
--2015-03-08 21:25:11-- http://node-arm.herokuapp.com/node_0.10.36_armhf.deb
Resolving node-arm.herokuapp.com (node-arm.herokuapp.com)... 54.243.70.214
Connecting to node-arm.herokuapp.com (node-arm.herokuapp.com)|54.243.70.214|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5745294 (5.5M) [application/x-debian-package]
Saving to: `node_0.10.36_armhf.deb'
100%[================================================================================>] 5,745,294 7.69M/s in 0.7s
<!DOCTYPE html>
<html>
<head>
<!-- EXTERNAL LIBS-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://www.google.com/jsapi"></script>
<!-- EXAMPLE SCRIPT -->
<script>
@chrowe
chrowe / SotW-RebelMouse
Last active August 29, 2015 14:00
RebelMouse
<html>
<body>
<h1>RebelMouse</h1>
<div>
<script type="text/javascript" class="rebelmouse-embed-script" src="https://www.rebelmouse.com/static/js-build/embed/embed.js?site=SummerontheWaterfrontBoston&height=1500&flexible=0&dont_load_new_posts=0&scrollbar_theme=default&show_rebelnav=1"></script>
</div>
</body>
<html>
@chrowe
chrowe / gist:5623634
Created May 21, 2013 22:01
settings.local.php template
<?php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => '',
'username' => '',
'password' => '',