Skip to content

Instantly share code, notes, and snippets.

@shahonseven
shahonseven / automations.yaml
Last active September 26, 2021 05:22
HA Doorbell TV Notification
- id: '1'
alias: Doorbell
description: ''
trigger:
- platform: event
event_type: sonoff.remote
event_data:
name: Doorbell
condition: []
action:
@shahonseven
shahonseven / bitbucket-webhook.php
Created May 2, 2018 08:17 — forked from maztch/bitbucket-webhook.php
A simple php script for deploy using bitbucket webhook
<?php
//edit with your data
$repo_dir = '~/repository.git';
$web_root_dir = '~/project';
$post_script = '~/project/scripts/post_deploy.sh';
$onbranch = 'master';
// A simple php script for deploy using bitbucket webhook
// Remember to use the correct user:group permisions and ssh keys for apache user!!
// Dirs used here must exists on server and have owner permisions to www-data
@shahonseven
shahonseven / AddressHeadersController.php
Created March 12, 2018 07:41
Saving associated data in CakePHP 3
<?php
namespace App\Controller;
class AddressHeadersController extends AppController
{
public function initialize()
{
parent::initialize();
@shahonseven
shahonseven / 0_reuse_code.js
Created December 6, 2015 07:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console