Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: State Based Entity Control2
description: Change the target entity to desired entity state base on the trigger entity's state, illuminance sensor's state, Sun elevation and so on.
domain: automation
input:
trigger_entities:
name: Trigger Entities
selector:
entity:
multiple: true
@ql-owo-lp
ql-owo-lp / state_based_entity_control.yaml
Last active August 4, 2021 20:34
State based Entity Control
blueprint:
name: State Based Entity Control
description: Change the target entity to desired entity state base on the trigger entity's state, illuminance sensor's state, Sun elevation and so on.
domain: automation
input:
trigger_entity:
name: Trigger Entity
description: This entity will trigger the automation.
selector:
entity:
@ql-owo-lp
ql-owo-lp / migrate.sh
Created June 25, 2019 04:53
seafile-sqlite to mysql
echo "Dropping database.."
mysql -e 'drop database if exists `seafile-ccnet`;'
mysql -e 'drop database if exists `seafile-main`;'
mysql -e 'drop database if exists `seafile-seahub`;'
echo 'Recreating ccnet database..'
mysql -e 'create database `seafile-ccnet` character set = "utf8";'
mysql 'seafile-ccnet' < seafile-server-latest/sql/mysql/ccnet.sql
echo 'Recreating seafile database..'
@ql-owo-lp
ql-owo-lp / adblock-generator.sh
Created January 22, 2018 05:57
adblock-generator.sh
#!bin/bash
SUBSCRIPTION_LIST=(
https://easylist-downloads.adblockplus.org/easyprivacy.txt
https://easylist-downloads.adblockplus.org/easylistchina.txt
https://easylist-downloads.adblockplus.org/easylist.txt
https://easylist-downloads.adblockplus.org/malwaredomains_full.txt
https://easylist-downloads.adblockplus.org/exceptionrules.txt
)
@ql-owo-lp
ql-owo-lp / ReactorDependenciesResolverMojoTest.java
Created November 9, 2017 01:28 — forked from vincent-zurczak/ ReactorDependenciesResolverMojoTest.java
A Maven mojo that shows how to resolve dependencies locations, be it in remote or in the local repository, or even in the reactor.
package whatever;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.DefaultArtifact;
import org.apache.maven.artifact.handler.DefaultArtifactHandler;
@ql-owo-lp
ql-owo-lp / The Technical Interview Cheat Sheet.md
Created May 24, 2017 07:22 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@ql-owo-lp
ql-owo-lp / ddns-start
Last active March 12, 2023 00:04
Asus-Merlin-DuckDNS
#!/bin/sh
# register a subdomain at https://www.duckdns.org/ to get your token
# put 'hostname:token' in the 'Host Name' field under DDNS
# e.g. myhost:abcdefgh-1234-5678-9876-f71b0ed7a7fe
DDNS_HOSTNAME_FIELD=$(nvram get ddns_hostname_x)
SUBDOMAIN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F':' '{print $1}')
TOKEN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F':' '{print $2}')
IPV4=$(nvram get wan0_ipaddr)
@ql-owo-lp
ql-owo-lp / _README.md
Created August 30, 2016 18:10 — forked from the-darkvoid/_README.md
AsusWRT Merlin: Isolate Guest WiFi
@ql-owo-lp
ql-owo-lp / .gitconfig
Last active September 12, 2016 07:35
ODL environment setup
[push]
default = simple
[alias]
ci = commit
co = checkout
cp = cherry-pick
st = status
ps = push
pl = pull
br = branch
@ql-owo-lp
ql-owo-lp / karabiner-private.xml
Last active September 23, 2015 21:38
Karabiner
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>CM_Storm</vendorname>
<vendorid>0x2516</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>QuickFire_TK</productname>
<productid>0x0011</productid>
</deviceproductdef>