Skip to content

Instantly share code, notes, and snippets.

View IT-Berater's full-sized avatar

Thomas Wenzlaff IT-Berater

View GitHub Profile
@IT-Berater
IT-Berater / clean_code.md
Last active May 15, 2024 18:19 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.

Clean-code


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
@IT-Berater
IT-Berater / contracts...Gehirn.sol
Created September 20, 2021 18:57
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4 <= 0.9;
/**
* @title Gehirn von Thomas Wenzlaff
* @dev Mein Smart Contract mit solidity zum Speichern von IQ auf der Blockchain
*/
contract Gehirn {
@IT-Berater
IT-Berater / .gitconfig
Created December 23, 2020 14:22
Git Alias Datei
[user]
email = email@nospam.de
name = Vorname Nachname
[alias]
tree = log --graph --oneline --all
br = branch
unstage = reset HEAD --
last = log -1 HEAD
aa = add --all
package de.wenzlaff.ubidots;
import com.ubidots.Variable;
/**
* CSV Objekt für Variablen von Ubidots.
*
* @author Thomas Wenzlaff
*
*/
package de.wenzlaff.ubidots;
import java.util.ArrayList;
import java.util.List;
import com.ubidots.ApiClient;
import com.ubidots.DataSource;
import com.ubidots.Variable;
/**
package de.wenzlaff;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
import org.junit.jupiter.api.Test;
import io.quarkus.test.junit.QuarkusTest;
@QuarkusTest
package de.wenzlaff;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/v1")
public class CO2AmpelResource {
package de.wenzlaff;
import java.time.LocalDateTime;
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.json.JSONArray;
@IT-Berater
IT-Berater / Corona.java
Created March 8, 2020 17:47
Corona - Covid-19 JSON Java Sample
package corona;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
import org.apache.commons.io.IOUtils;
import org.json.JSONException;
import org.json.JSONObject;
@IT-Berater
IT-Berater / RkiCoronaFallzahlenDeutschland.java
Created March 8, 2020 17:45
Corona - Covid-19 from RKI
import java.io.IOException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
/**
* Beispiel Abfrage Coronavirus vom RKI.