Install a raspberry pi with the latest OpenHABian version.
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
rm mosquitto-repo.gpg.key
cd /etc/apt/sources.list.d/
#!/bin/sh | |
cd ~ | |
sudo apt-get update | |
sudo apt-get install netatalk git python-dev python-pip python-rpi.gpio -y | |
sudo pip install Flask | |
git clone git://git.drogon.net/wiringPi | |
cd wiringPi | |
./build | |
cd .. | |
git clone https://github.com/mirhec/raspi-http-switch.git |
using System.IO; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
internal class IniFile // revision 11 | |
{ | |
readonly string _path; | |
readonly string _exe = Assembly.GetExecutingAssembly().GetName().Name; |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
internal class Ini | |
{ | |
private readonly Dictionary<string, Dictionary<string, string>> _ini = new Dictionary<string, Dictionary<string, string>>(StringComparer.InvariantCultureIgnoreCase); | |
private string CurrentSection { get; set; } = ""; | |
public Ini(string iniContents) |
#!/usr/bin/env python | |
# | |
# Hi There! | |
# You may be wondering what this giant blob of binary data here is, you might | |
# even be worried that we're up to something nefarious (good for you for being | |
# paranoid!). This is a base85 encoding of a zip file, this zip file contains | |
# an entire copy of pip. | |
# | |
# Pip is a thing that installs packages, pip itself is a package that someone | |
# might want to install, especially if they're looking to run this get-pip.py |
2017/05/24 13:55:15 Serving [::]:3000 with pid 3734 | |
[Macaron] 2017-05-24 13:55:17: Started GET /SIMON-IBV/QMT/releases for [::1] | |
[Macaron] PANIC: runtime error: slice bounds out of range | |
/usr/local/go/src/runtime/panic.go:489 (0x433b4) | |
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz)) | |
/usr/local/go/src/runtime/panic.go:35 (0x42204) | |
panicslice: panic(sliceError) | |
/home/git/src/code.gitea.io/gitea/vendor/code.gitea.io/git/repo_tag.go:136 (0x3519e0) | |
parseTag: next := strings.IndexByte(left[end+2:], ' ') | |
/home/git/src/code.gitea.io/gitea/vendor/code.gitea.io/git/repo_tag.go:164 (0x351bf4) |
version: '2' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy:alpine | |
container_name: nginx-proxy | |
restart: always | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: |
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
################################################################################################### | |
#### Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
#### | |
#### Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file | |
#### except in compliance with the License. A copy of the License is located at | |
#### | |
#### http://aws.amazon.com/apache2.0/ | |
#### | |
#### or in the "license" file accompanying this file. This file is distributed on an "AS IS" | |
#### BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
extern crate structopt; | |
extern crate ini; | |
use structopt::StructOpt; | |
use std::path::{Path, PathBuf}; | |
use ini::Ini; | |
use std::fs::{self, DirEntry}; | |
#[derive(StructOpt, Debug)] | |
#[structopt(name = "type-cli")] |