I hereby claim:
- I am ralight on github.
- I am ralight (https://keybase.io/ralight) on keybase.
- I have a public key whose fingerprint is A0D6 EEA1 DCAE 49A6 35A3 B2F0 779B 22DF B3E7 17B7
To claim this, I am signing this object:
import paho.mqtt.subscribe as subscribe | |
import json | |
import os | |
def on_message(client, userdata, msg): | |
#print(msg.topic+" "+str(msg.payload)) | |
payload = json.loads(msg.payload) | |
if "action" in payload and "rgb" in payload and "mac" in payload: | |
if payload['mac'] == "23:02:04:00:01:c6": | |
r,g,b = payload['rgb'] |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk | |
import sys | |
class Main(object): | |
def __init__(self): | |
self.window = None | |
self.width = 500 | |
self.height = 500 |
{ | |
"retry_interval": 20, | |
"sys_interval": 10, | |
"listeners": { | |
"port": 1883, | |
"max_connections": -1, | |
"auth_plugin": { | |
"plugin_path": "auth-plug.so", |
#include <stdio.h> | |
#include <stdlib.h> | |
#define COUNT 100000 | |
#define BLOCKSIZE 1000 | |
int main(int argc, char *argv[]) | |
{ | |
char **ptr; |
#include <stdio.h> | |
#include <netdb.h> | |
#include <sys/socket.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/epoll.h> | |
#include <fcntl.h> | |
#define BUF_SIZE 10000 |
I hereby claim:
To claim this, I am signing this object:
cd mosquitto/lib | |
cp somewhere/hows.c . | |
gcc hows.c net_mosq.c logging_mosq.c memory_mosq.c messages_mosq.c mosquitto.c read_handle.c read_handle_client.c read_handle_shared.c send_mosq.c send_client_mosq.c time_mosq.c tls_mosq.c util_mosq.c will_mosq.c -I. -I.. -DWITH_TLS -lrt -lssl -lcrypto -o hows | |
./hows |
#include <errno.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <mosquitto.h> | |
#define MAX 100000 |
import getopt | |
import mosquitto | |
import sys | |
final_mid = 0 | |
def on_connect(mosq, userdata, rc): | |
if userdata == True: | |
print("rc: "+str(rc)) |
#!/usr/bin/python | |
import mosquitto | |
import time | |
def on_connect(mosq, obj, rc): | |
print("Connected: "+mosq._client_id) | |
def on_disconnect(mosq, obj, rc): | |
print("Disconnected: "+mosq._client_id + " ("+str(rc)+")") |