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
blueprint: | |
name: Toggle device status after a period of time | |
description: "Once a device has been in a defined status for a period of time, toggle it's status" | |
domain: automation | |
input: | |
trigger_device: | |
name: Device | |
description: Which device to monitor and toggle? | |
selector: | |
entity: |
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
for i in *.heic; do sips -s format jpeg -s formatOptions best "${i}" --out "${i%heic}jpg" && touch -r "${i}" "${i%heic}jpg"; done |
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
- (BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch | |
{ | |
if ([gestureRecognizer isEqual:self.tapRecognizer]) { | |
// for ios 7 , need to compare with UITableViewCellContentView | |
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"] || [touch.view.superview isKindOfClass:[UITableViewCell class]]) { | |
return FALSE; | |
} | |
} | |
return TRUE; | |
} |
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
// | |
// ZoomCardFlowLayout.swift | |
// | |
// | |
// Created by Oni_01 on 12/05/15. | |
// Copyright (c) 2015 Andrea Altea. All rights reserved. | |
// | |
import UIKit |
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 | |
DATE=$(date +"%Y-%m-%dT%H-%M-%SZ") | |
HOME=/home/pi | |
BACKUP=$HOME/backup | |
WHERE=$BACKUP/$DATE | |
# create dated backup folders | |
mkdir -p $WHERE/{sqlite,nodered,etc,homebridge} |
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 | |
#Thx, http://stackoverflow.com/questions/20723868/batch-rename-dropbox-conflict-files | |
#Point to where you want the script to look and where it should backup files it replaces | |
folder="$(pwd)" | |
backup=~/Desktop/Dropbox.backup | |
#colors | |
red='\033[0;31m' |