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 / config.yml
Created March 26, 2020 16:43
Travertine's default config.yml
server_connect_timeout: 5000
remote_ping_cache: -1
forge_support: true
player_limit: -1
permissions:
default:
- bungeecord.command.server
- bungeecord.command.list
admin:
- bungeecord.command.alert
@bnjdg
bnjdg / SpotifyD LXC Build.md
Last active June 15, 2019 11:19
Cross Build SpotifyD inside an lxc container for arm64

LXD

First add the new Ubuntu Minimal images simplestreams endpoint:

lxc remote add --protocol simplestreams ubuntu-minimal https://cloud-images.ubuntu.com/minimal/releases/

Launch the Bionic minimal image:

@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 / README.md
Last active September 19, 2021 10:15
XMRig tmux systemd service files
@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 / setup.sh
Created March 28, 2018 17:20
create lxd ct with static ip
Create the network config
vi network-config.yml
version: 1
config:
- type: physical
name: eth0
subnets:
- type: static
ipv4: true
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb http://ph.archive.ubuntu.com/ubuntu/ artful main restricted universe multiverse
deb-src http://ph.archive.ubuntu.com/ubuntu/ artful main restricted universe multiverse
###### Ubuntu Update Repos
@bnjdg
bnjdg / geonode-install.sh
Last active February 27, 2018 13:39
geonode setup
#!/bin/bash
apt-get update
apt-get install -y software-properties-common
apt-get install -y python-virtualenv python-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev libjpeg-dev libpq-dev libgdal-dev git default-jdk
apt-get install -y build-essential openssh-server gettext nano vim unzip zip patch git-core postfix
apt-add-repository -y ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
apt-add-repository -y ppa:ubuntugis && apt-get update && apt-get upgrade
apt-add-repository -y ppa:ubuntugis/ppa && apt-get update && apt-get upgrade
@bnjdg
bnjdg / iptables-web.sh
Created July 2, 2017 18:53
Iptables for web servers
#!/bin/sh
DEF_IF=$(route | grep '^default' | grep -o '[^ ]*$')
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -X
iptables -X -t nat
iptables -F
iptables -F -t nat