This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// Rough steps to securing Home Assistant/Hassio with Cloudflare Access | |
// Install Caddy addon in hass io | |
// Set up port forwarding on router to point port 443 at Caddy | |
// Set up Cloudflare Access to protect the domain pointing at your home IP | |
// Only allow port forwarding from CloudFlare IP addresses | |
// To only accept connections that have come from Cloud Flare access do the following: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup | |
val regex = """(\w+)@(\w+\.\w+)\.(au|uk|de)""".r | |
val doARegexMatch = (str: String) => str match { | |
case regex(user, domain, tld) => s"user: $user, domain: $domain, tld: $tld" | |
} | |
// Good |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modified from http://stackoverflow.com/a/25585402/1153203 | |
// to support ngModel attributes that are getterSetter functions | |
// see "Binding to a getter/setter" in | |
// https://docs.angularjs.org/api/ng/directive/ngModel | |
(function (module, require) { | |
'use strict'; | |
var Utils = require('../../shared/utils.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright Christian Neumüller 2012. Use, modification and distribution is | |
// subject to the Boost Software License, Version 1.0. (See accompanying | |
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
// Hacked up due to compile errors | |
#ifndef LUABIND_STD_SHAREDPTR_CONVERTER_HPP_INCLUDED | |
#define LUABIND_STD_SHAREDPTR_CONVERTER_HPP_INCLUDED \ | |
LUABIND_STD_SHAREDPTR_CONVERTER_HPP_INCLUDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright Daniel Wallin 2009. Use, modification and distribution is | |
// subject to the Boost Software License, Version 1.0. (See accompanying | |
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
// Modified by Sean Dawson for std::shared_ptr 10/may/2014 | |
#ifndef LUABIND_STD_SHARED_PTR_CONVERTER_090211_HPP | |
# define LUABIND_STD_SHARED_PTR_CONVERTER_090211_HPP | |
# include <luabind/get_main_thread.hpp> |