Skip to content

Instantly share code, notes, and snippets.

View 0xdecaf's full-sized avatar

Tony 0xdecaf

View GitHub Profile
@0xdecaf
0xdecaf / zen34-blueprint.yaml
Created April 12, 2022 07:00 — forked from markwmuller/zen34-blueprint.yaml
Zooz Zen34 Home Assistant Blueprint
# Blueprint metadata
blueprint:
name: Zooz ZEN34 Remote Extended Controller
description: |
Use the Zooz ZEN34 remote to trigger Scenes and control devices based on varying scenes.
This Blueprint is currently configured for the zwaveJS platform.
Long press to continuously loop an action (e.g. dim lights)
#!/bin/sh
# Add the rule to the PF configuration file
echo "block drop quick on lo0 proto tcp from any to any port = 19421" >> /etc/pf.conf
# Reload the configuration
pfctl -f /etc/pf.conf
# Ensure the firewall is enabled
/usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
# Enabling Stealth mode turns on the pf firewall
/usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on
package org.chaoslabs.beam.pipelines;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.coders.KvCoder;
import org.apache.beam.sdk.coders.StringUtf8Coder;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubIO;
import org.apache.beam.sdk.io.jdbc.JdbcIO;
import org.apache.beam.sdk.options.Default;
package org.chaoslabs.beam.pipelines;
import com.google.gson.Gson;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.coders.StringUtf8Coder;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubIO;
import org.apache.beam.sdk.io.jdbc.JdbcIO;
import org.apache.beam.sdk.options.Default;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
/**
* An interface used by the JdbcIO Write to set the parameters of the {@link PreparedStatement}
* used to setParameters into the database.
*/
@FunctionalInterface
public interface PreparedStatementSetter<T> extends Serializable {
void setParameters(T element, PreparedStatement preparedStatement) throws Exception;
}
public class JdbcIO {
public abstract static class ReadAll<ParameterT, OutputT>
extends PTransform<PCollection<ParameterT>, PCollection<OutputT>>
}
public class JdbcIO {
public abstract static class Read<T> extends PTransform<PBegin, PCollection<T>>
}

Keybase proof

I hereby claim:

  • I am 0xdecaf on github.
  • I am bone (https://keybase.io/bone) on keybase.
  • I have a public key whose fingerprint is FB85 7979 63F9 49E2 8B70 216B BC7A 6F56 A53B CE6D

To claim this, I am signing this object: