Skip to content

Instantly share code, notes, and snippets.

# Redirect all http traffic to https
server {
listen 80;
return 301 https://$host$request_uri;
}
# Portainer Upstream
upstream portainer {
server YOUR.PI.IP.ADDRESS:9000;
keepalive 32;
version: '2.1'
services:
homeassistant:
container_name: homeassistant
image: homeassistant/home-assistant:0.99.1
network_mode: "host"
volumes:
- /opt/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
@hallister
hallister / javascript.json
Created November 29, 2016 19:52
VS Code Snippets for React/Emsi-UI
{
"Component Will Mount": {
"prefix": "willmount",
"body": [
"componentWillMount() {",
"\t$0",
"}"
],
"description": "React componentWillMount"
},
@hallister
hallister / RenderTest.jsx
Created September 9, 2015 23:44
No prop errors on es6 class that renders a React.createElement
import React from 'react';
export class RenderTest extends React.Component {
static propTypes = {};
static defaultProps = {
component: 'div'
};
render() {
@hallister
hallister / angular-editable-no-DOM
Created August 8, 2013 18:13
An Angular directive that has no awareness of the DOM
angular.module('ui.bootstrap.editable', [])
.constant('editableConfig', {
validators: {
required: 'This field is required.',
min: 'A minimum value of {{ value }} is required.',
max: 'A maximum value of {{ value }} is allowed.',
ngMinlength: 'A minimum length of {{ value }} is required.',
ngMaxlength: 'A maximum length of {{ value }} is allowed.',
email: 'A valid email address is required.',
url: 'A valid URL is required.',