Skip to content

Instantly share code, notes, and snippets.

View larsenglund's full-sized avatar

Lars Englund larsenglund

View GitHub Profile
sudo apt-get update # Repair things that that seem to be a little sick.
sudo apt-get upgrade
sudo apt-get install -f locales
sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales # Select "en_US" locales.
sudo apt-get install gcc make # Get the C compiler
cd ~/chipled
cat >on.c <<__EOF__ # Create C programs to turn the status LED on
#include <stdio.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include <ESP8266mDNS.h>
#include <EEPROM.h>
#include <FS.h>
#include <ESP8266HTTPUpdateServer.h>
#include <WebSocketsServer.h> // library: https://github.com/Links2004/arduinoWebSockets
const char* websocketPageHead = R"(
<!DOCTYPE html><html><head><title>RakuTemp</title>
<script src='Chart.bundle.min.js'></script>
<style>
html * {
font-family: Arial;
}
</style>
<script>
var waitingForData = false;
const char* websocketPageHead = R"(
<!DOCTYPE html><html><head><title>RakuTemp</title>
<script src='Chart.bundle.min.js'></script>
<style>
html * {
font-family: Arial;
}
</style>
<script>
var waitingForData = false;
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include <ESP8266mDNS.h>
#include <EEPROM.h>
#include <FS.h>
#include <ESP8266HTTPUpdateServer.h>
#include <WebSocketsServer.h> // library: https://github.com/Links2004/arduinoWebSockets
void MDNSResponder::_parsePacket(){
int i;
char tmp;
bool serviceParsed = false;
bool protoParsed = false;
bool localParsed = false;
char hostName[255];
uint8_t hostNameLen;
@larsenglund
larsenglund / Android Privacy Policy Template
Created September 28, 2017 18:00 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
/**
* Modified https://github.com/inviqa/SysAdmin/tree/master/goddamn
* By Lars Englund <[email protected]>
*/
/**
* GoDDaMn is inspired by the Google Script project named 'Generate Google Docs' by Mikko Ohtamaa (http://opensourcehacker.com)
* http://opensourcehacker.com/2013/01/21/script-for-generating-google-documents-from-google-spreadsheet-data-source/
*
esphome:
name: co2
platform: ESP8266
board: d1_mini
wifi:
ssid: "Totoro"
password: "u11egu11e"
# Enable logging