Skip to content

Instantly share code, notes, and snippets.

@kevindayton
kevindayton / RaZberry API Command Examples
Created February 4, 2016 01:30 — forked from integrii/RaZberry API Command Examples
RaZberry API ZAutomation/ZAPI Examples
# I had a LOT of trouble finding working examples of the ZAutomation API for RaZberry API. I eventually figured out what exactly to use by combining information from multiple sources and sniffing requests from the 'Expert UI'. Some areas I found information:
- http://docs.zwayhomeautomation.apiary.io/
- http://wiki.micasaverde.com/index.php/ZWave_Command_Classes
- https://www.npmjs.org/package/mqtt-zway
- The included PDFs
- The expert API area on the device web UI
- https://chrome.google.com/webstore/detail/postman-interceptor/aicmkgpgakddgnaphhhpliifpcfhicfo?hl=en (Postman POST/GET sniffer)
# Some general RaZberry API commands:
#!/bin/bash
# installer zway to raspberry
INSTALL_DIR=/opt
ZWAY_DIR=$INSTALL_DIR/z-way-server
TEMP_DIR=/tmp
BOXED=`[ -e /etc/z-way/box_type ] && echo yes`
if [[ $ZWAY_UPIF ]]; then
write_upi() {

Keybase proof

I hereby claim:

  • I am kevindayton on github.
  • I am dayton (https://keybase.io/dayton) on keybase.
  • I have a public key whose fingerprint is 9433 E331 5D18 F60F 247A 4E98 D87F 1192 2EF2 41F9

To claim this, I am signing this object:

@kevindayton
kevindayton / unicorn
Created April 19, 2015 15:36
init.d script for single or multiple unicorn installations
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by [email protected] http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
We couldn’t find that file to show.
We couldn’t find that file to show.
@kevindayton
kevindayton / apache-2.2-php5.5-fpm
Last active August 29, 2015 14:04
Apache 2.2 config for PHP 5.5 with PHP-FPM
# Setting up Apache 2.2 / PHP 5.5 with PHP-FPM on OS X Mavericks
# Using Homebrew http://brew.sh
# 1. brew install apache22
# 2. brew install --with-fpm --with-mysql php55
# 3. mkdir /usr/local/var/apache2/cgi-bin/fastcgi/php5.fcgi
# based on http://serverfault.com/a/326920
# The following goes into your httpd.conf or and extra conf file
# phpfpm/fastcgi
# Here we catch the 'false' Location used to inexistent php5.external
# and push it to the external FastCgi process via a socket
/**
* http://plugins.jquery.com/project/query-object
* jQuery.query - Query String Modification and Creation for jQuery
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
* Date: 2009/8/13
*
* @author Blair Mitchelmore
* @version 2.1.7
*
@kevindayton
kevindayton / org.apache.httpd.brew.plist
Created June 9, 2013 18:40
Launchd plist for auto-starting Homebrew httpd.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.apache.httpd.brew</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/apachectl</string>
<string>start</string>
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
#
# http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/
#