Skip to content

Instantly share code, notes, and snippets.

View bnjdg's full-sized avatar

Benj Dag bnjdg

  • UP COE HPC Team / ERDT
  • Quezon City
View GitHub Profile
@bnjdg
bnjdg / motion-actiovated-switch.yaml
Last active July 2, 2022 20:34 — forked from freakshock88/motion_illuminance_activated_entity.yaml
Home Assistant BluePrint to turn on light, switch, scene or script based on motion and illuminance
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
@bnjdg
bnjdg / conf.sh
Created June 17, 2018 19:10 — forked from CHEF-KOCH/conf.sh
OpenVPN + DNSCrypt and Unbound traffic (Debian)
# Unbound configuration file for Debian.
# See the unbound.conf(5) man page.
# See /usr/share/doc/unbound/examples/unbound.conf for a commented
# reference config file.
server:
# The following line will configure unbound to perform cryptographic
# DNSSEC validation using the root trust anchor.
auto-trust-anchor-file: "/var/lib/unbound/root.key"
server:
@bnjdg
bnjdg / openvpn-in-lxd.txt
Last active June 14, 2018 10:51 — forked from wastrachan/openvpn-in-lxd.txt
OpenVPN in LXD Container
# On the host
=============
lxc profile set default raw.lxc 'lxc.cgroup.devices.allow = c 10:200 rwm'
lxc profile device add default tun unix-char path=/dev/net/tun
# In the container
==================
1. mknod /dev/net/tun c 10 200
@bnjdg
bnjdg / 0_reuse_code.js
Created June 6, 2017 23:40
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