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
metadata { | |
// Automatically generated. Make future change here. | |
definition (name: "Accessory Switch", namespace: "mckeed", author: "Duncan") { | |
capability "Switch" | |
capability "Switch Level" | |
capability "Sensor" | |
command "associate" | |
fingerprint deviceId: "0x12" |
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
/** | |
* Z-Wave Garage Door Opener | |
* | |
* Copyright 2014 SmartThings | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
/** | |
* Copyright 2015 SmartThings | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed | |
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License |
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 | |
# Looks for local devices that respond to broadcast ping and have open telnet ports | |
`ifconfig`.scan(/broadcast ([\d.]+)/) do |b,| | |
next unless b[/^(192|10)\./] | |
puts "Scanning #{b.gsub(/255/, '*')}" | |
`ping -c2 #{b}`.scan(/from ([\d.]+)/).uniq.sort_by {|a,| | |
a.split('.').map {|p| p.to_i } | |
}.each do |a,| |
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 | |
# encoding: UTF-8 | |
require 'rubygems' | |
require 'active_support/core_ext' | |
require 'rest_client' | |
require 'json' unless defined?(JSON) | |
require 'growl' | |
API_KEY = ENV["DARKSKY_API_KEY"] |
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
if [ -d "$2" ]; then | |
( set -x | |
tar -cz "$2" | keybase encrypt -bs $1 -o "$2".tgz.gpg | |
) | |
elif [ -f "$2" ]; then | |
( set -x | |
keybase encrypt -bs $1 $2 | |
) | |
else | |
echo "Usage: encrypto keybaseuser path" |
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
#!/bin/bash | |
if [ ! -z `git diff --name-only HEAD@{1}..HEAD Gemfile` ] | |
then | |
echo -e "\033[0;31m*** Gemfile change detected, running bundle install ***\033[0m" | |
bundle install | |
fi | |
if [ ! -z `git diff --name-only HEAD@{1}..HEAD db/migrate` ] | |
then |
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
javascript:document.getElementsByTagName("tbody")[0].deleteRow(-1);document.getElementsByTagName("tbody")[0].deleteRow(0) |