Skip to content

Instantly share code, notes, and snippets.

View normanmaurer's full-sized avatar
🤙

Norman Maurer normanmaurer

🤙
View GitHub Profile
@jmadden91
jmadden91 / 4 Channel Relay.ino
Created April 4, 2019 23:09
4 Channel Relay MQTT
//EJ: 4 Relay Switch over WIFI using MQTT and Home Assistant with OTA Support
//EJ: The only way I know how to contribute to the HASS Community... you guys ROCK!!!!!
//EJ: Erick Joaquin :-) Australia
// Original sketch courtesy of ItKindaWorks
//ItKindaWorks - Creative Commons 2016
//github.com/ItKindaWorks
//
//Requires PubSubClient found here: https://github.com/knolleary/pubsubclient
//
import org.vertx.java.core.AsyncResult;
import org.vertx.java.core.Handler;
import org.vertx.java.core.Vertx;
import org.vertx.java.core.VertxFactory;
import org.vertx.java.core.buffer.Buffer;
import org.vertx.java.core.net.NetServer;
import org.vertx.java.core.net.NetSocket;
import javax.net.SocketFactory;
import java.io.IOException;
java.lang.NullPointerException
at org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer.stop(NettyJaxrsServer.java:145)
at org.hornetq.rest.test.Embedded.stop(Embedded.java:103)
at org.hornetq.rest.test.MessageTestBase.shutdownHornetqServerAndManager(MessageTestBase.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.CountDownLatch;
public class Server {
final CountDownLatch latch = new CountDownLatch(1);
@martinklepsch
martinklepsch / fritzbox_reconnect.py
Created April 22, 2010 19:39
Simple script to reconnect your fritz.box
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Instruct an AVM FRITZ!Box via UPnP_ to reconnect.
This is usually realized with tools like Netcat_ or cURL_. However, when
developing in Python_ anyway, it is more convenient to integrate a native
implementation. This one requires Python_ 2.5 or higher.
UPnP_ (Universal Plug and Play) control messages are based on SOAP_, which is