Skip to content

Instantly share code, notes, and snippets.

View rappleg's full-sized avatar

Ryan Applegate rappleg

  • One Tap Away
  • Minneapolis, MN
View GitHub Profile
@rappleg
rappleg / gist:6451268
Created September 5, 2013 14:55
Doors Child
/**
* Doors Child
*
* Author: ryan
* Date: 2013-08-27
*/
preferences {
page(name: "createDoor", title: "Add a new door", nextPage: "doorDetail") {
section("Add a new door") {
label title:"Give your door a name"
@rappleg
rappleg / gist:6451240
Created September 5, 2013 14:54
Doors Parent
/**
* Doors
*
* Author: ryan
* Date: 2013-08-26
*/
preferences {
page(name: "root", title: "Doors", nextPage: "createDoor", install: true) {
section(" ") {
app "door", "Solutions", "New Door", title: "Add a door", page: "createDoor", childTitle: "Your doors", childPage: "doorDetail", install: true, multiple: true
@rappleg
rappleg / .git_ps1
Created August 15, 2013 17:37
GIT PS1 for adding latest SHA, branch name with coloration (green if up to date, red if dirty) to your prompt
c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch ()
{
if git rev-parse --git-dir >/dev/null 2>&1
then
git_status="$(git status 2> /dev/null)"
@rappleg
rappleg / gist:5904660
Created July 1, 2013 21:09
Legacy DropCam Handler
metadata {
simulator {
status "image": "raw:C45F5708D89A4F3CB1A7EEEE2E0C73D900, image:C45F5708D89A4F3CB1A7EEEE2E0C73D9, result:00"
reply "take C45F5708D89A4F3CB1A7EEEE2E0C73D9": "raw:C45F5708D89A4F3CB1A7EEEE2E0C73D900, image:C45F5708D89A4F3CB1A7EEEE2E0C73D9, result:00"
}
tiles {
standardTile("camera", "device.image", width: 1, height: 1, canChangeIcon: false, inactiveLabel: true, canChangeBackground: false) {
state "default", label: "", action: "", icon: "st.camera.dropcam-centered", backgroundColor: "#FFFFFF"
metadata {
simulator {
status "image": "raw:C45F5708D89A4F3CB1A7EEEE2E0C73D900, image:C45F5708D89A4F3CB1A7EEEE2E0C73D9, result:00"
reply "take C45F5708D89A4F3CB1A7EEEE2E0C73D9": "raw:C45F5708D89A4F3CB1A7EEEE2E0C73D900, image:C45F5708D89A4F3CB1A7EEEE2E0C73D9, result:00"
}
tiles {
standardTile("camera", "device.image", width: 1, height: 1, canChangeIcon: false, inactiveLabel: true, canChangeBackground: false) {
state "default", label: "", action: "", icon: "st.camera.dropcam-centered", backgroundColor: "#FFFFFF"
/**
* Text Me A Picture When There's Motion
*
* Author: SmartThings
*/
preferences {
section("When there's movement..."){
input "motion1", "capability.motionSensor", title: "Front Door"
}
section("Take a picture..."){
@rappleg
rappleg / gist:5852620
Created June 24, 2013 19:11
.bash_profile
# vi keybindings
#set -o vi
# Color for ls
export CLICOLOR=true
export LSCOLORS="exfxcxdxbxegedabagacad"
# Prompt
if [ -f $HOME/scripts/bash/.git_ps1 ]; then
. $HOME/scripts/bash/.git_ps1
@rappleg
rappleg / .git_aliases
Last active March 8, 2024 12:20
Git Aliases
alias vig='vi $HOME/scripts/bash/.git_aliases'
# GIT aliases
alias st='git status --short'
alias rb='git rebase -p'
alias rbi='git rebase -p --interactive'
alias rbm='git rebase -p master'
alias gcp='git cherry-pick'
alias stash='git stash'
alias pop='git stash pop'