Skip to content

Instantly share code, notes, and snippets.

View jtuttas's full-sized avatar

jtuttas jtuttas

  • http://www.mmbbs.de
View GitHub Profile
@jtuttas
jtuttas / ausbilder.html
Last active October 30, 2018 08:22
Ausbildersprechtag Buchungssystem. Also der Teilnehmer ruft die Webseite ausbilder.html auf, via Java Script wird sich dann mit der Google Tabelle verbunden, die in Zeile 137 adressiert wird. Dort (also in der Google Tabelle) läuft das Script code.gs)
<!DOCTYPE html>
<html>
<head>
<title>Ausbildersprechtag</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15"/>
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@jtuttas
jtuttas / index.js
Last active October 8, 2018 12:42
SQLITE mit Node.js
var sqlite3 = require('sqlite3').verbose();
db = new sqlite3.Database('./users.db');
db.serialize(function () {
db.run("CREATE TABLE IF NOT EXISTS users (" +
"id INTEGER PRIMARY KEY AUTOINCREMENT," +
"uuid VARCHAR (80) NOT NULL," +
"email VARCHAR (80) NOT NULL," +
"generated DATETIME," +
@jtuttas
jtuttas / App.java
Created June 26, 2018 10:31
VS Code JPA
package ormtest;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
/**
* Hello world!
*
*/
public class App
@jtuttas
jtuttas / temperature.cpp
Created May 26, 2018 07:31
Read Temperature of DS18b20 with ESP32
#include "Arduino.h"
#include <DallasTemperature.h>
// Data wire is plugged into pin 21 on the ESP32
#define ONE_WIRE_BUS 21
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature DS18B20(&oneWire);
char temperatureCString[6];
float tempC = 0.0;
@jtuttas
jtuttas / post.cpp
Created May 23, 2018 07:10
Send Data to adafruit Clound
#include "esp_wpa2.h"
#include <WiFi.h>
#include <HTTPClient.h>
// SSID to connect to
static const char* ssid = "MMBBS-Intern";
// Username for authentification
#define EAP_ID "tuttas"
#define EAP_USERNAME "tuttas"
@jtuttas
jtuttas / curl.sh
Last active June 11, 2020 14:28
Daten in die adafruit Cloud eintragen
curl --header "Content-Type: application/json" --header "x-aio-key: aio_dUnx007cL54aZqVs9jemddNy6hVj" --data "{\"value\":18}" https://io.adafruit.com/api/v2/jtuttas/feeds/fiae19/data
@jtuttas
jtuttas / esp32form.cpp
Last active October 8, 2018 06:55
ESP32 mit Form TAG
#include "esp_wpa2.h"
#include <WiFi.h>
// SSID to connect to
static const char* ssid = "MMBBS-Intern";
// Username for authentification
#define EAP_ID "tuttas"
#define EAP_USERNAME "tuttas"
#define EAP_PASSWORD "geheim"
@jtuttas
jtuttas / esp32Server.cpp
Last active November 28, 2018 10:11
Einfacher WLAN Server
#include "esp_wpa2.h"
#include <WiFi.h>
// SSID to connect to
static const char* ssid = "MMBBS-Intern";
// Username for authentification
#define EAP_ID "tuttas"
#define EAP_USERNAME "tuttas"
#define EAP_PASSWORD "geheim"
@jtuttas
jtuttas / esp32wpa2.cpp
Last active March 18, 2019 11:29
WPA2 Connection ESP32
#include "esp_wpa2.h"
#include "WiFi.h"
// SSID to connect to
static const char *ssid = "MMBBS-Intern";
// Username for authentification
#define EAP_ID "tuttas"
#define EAP_USERNAME "tuttas"
#define EAP_PASSWORD "geheim"
import paho.mqtt.client as mqtt
import json
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
#Variables that contains yours credentials to access Twitter API
access_token = ""
access_token_secret = ""
consumer_key = ""