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: Motion-activated light scene with surrounding light level check and optional ambient scene | |
description: Turn on a light scene when motion is detected. Three different scenes can be defined depending on time of day. Furthermore a source for checking sourrounding light can be defined to enable light only if it is dark enough. | |
domain: automation | |
source_url: https://gist.github.com/dirkk1980/3e5c23acb05fb639bafdc5036b91aae6 | |
input: | |
motion_entity: | |
name: Motion Sensor | |
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
blueprint: | |
name: Motion-activated Switch | |
description: Turn on a switch when motion is detected. | |
domain: automation | |
input: | |
motion_entity: | |
name: Motion Sensor | |
selector: | |
entity: | |
domain: binary_sensor |
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
# Git clone the repository | |
git clone [email protected]:mbarcia/drupsible-project.git | |
cd drupsible-project/ | |
# Track all remote branches in the local repository | |
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs | |
# Delete those branches already merged into master (in the remote repository) | |
git branch --merged | grep -v "master" | grep -v "*" | grep -v "\." | xargs -I % git push --delete origin % |
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/sh | |
PROJECTS=(drupsible-apache \ | |
drupsible-composer \ | |
drupsible-deploy \ | |
drupsible-drush \ | |
drupsible-memcached \ | |
drupsible-mysql \ | |
ansible-newrelic \ | |
drupsible-varnish \ |
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/sh | |
# Note: ~/.ssh/environment should not be used, as it | |
# already has a different purpose in SSH. | |
env="$HOME/.ssh-agent" | |
# Note: Don't bother checking SSH_AGENT_PID. It's not used | |
# by SSH itself, and it might even be incorrect | |
# (for example, when using agent-forwarding over SSH). |
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
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
source /etc/network/interfaces.d/* | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback |
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
/** | |
* Returns the IP address of the client machine. | |
* | |
* If Drupal is behind a reverse proxy, we use the X-Forwarded-For header | |
* instead of $_SERVER['REMOTE_ADDR'], which would be the IP address of | |
* the proxy server, and not the client's. The actual header name can be | |
* configured by the reverse_proxy_header variable. | |
* | |
* @return | |
* IP address of client machine, adjusted for reverse proxy and/or cluster |
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/sh | |
# | |
# memcached Startup script for memcached processes | |
# | |
# chkconfig: - 90 10 | |
# description: Memcache provides fast memory based storage. | |
# processname: memcached | |
# These mappings correspond one-to-one with Drupal's settings.php file. |
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
Mariano@avedeplata MINGW64 ~/drupsible | |
$ git clone https://github.com/mbarcia/drupsible-project.git drupal-commerce | |
Cloning into 'drupal-commerce'... | |
remote: Counting objects: 685, done. | |
remote: Compressing objects: 100% (160/160), done. | |
d 522 | |
Receiving objects: 100% (685/685), 113.64 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (365/365), done. | |
Checking connectivity... 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
#!/bin/bash | |
# warmly.sh | |
# A wget based, easy, poor man`s cache warmer script | |
# Originally forked from | |
# https://gist.github.com/thomasfr/7926314 | |
# No trailing slash | |
WARMLY_START_URL="${1}" |
NewerOlder