This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyre import zbeacon | |
import zmq | |
import struct | |
import uuid | |
import socket | |
ctx = zmq.Context() | |
beacon = zbeacon.ZBeacon(ctx, 1200) | |
transmit = struct.pack('cccb16sH', b'Z',b'R',b'E', | |
1, uuid.uuid4().bytes, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# win_socket_test.py | |
# | |
# Test using netcat: | |
# nc -un 127.0.0.1 1200 | |
# Broadcast test: | |
# socat - UDP-DATAGRAM:255.255.255.255:1200,broadcast | |
import socket | |
import struct | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Start this script through the Advanced Launcher Addon | |
# | |
# This script fixes not getting a display after stopping Kodi | |
# After quitting UAE it will return to Kodi | |
# | |
# Expecting UAE4All in /home/pi/amiga/uae4all | |
# | |
# Author: Arnaud Loonstra <arnaud@sphaero.org> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# WARNING: This is a very nast hack into passing the pointer of an | |
# object through a socket thus bypassing any copy. The garbage | |
# collector can remove an object before its being received so you | |
# should know what you are doing! | |
import threading | |
from PIL import Image, ImageDraw, ImageTk | |
import zmq | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compatible with Python3, tested on Linux | |
# Author Arnaud Loonstra <arnaud@sphaero.org> | |
# based on <http://code.activestate.com/recipes/439093/#c1> | |
import socket | |
import fcntl | |
import struct | |
import array | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on http://carnivore.it/2012/10/12/python3.3_sendmsg_and_recvmsg | |
# Example of using the new recvmsg() method of the sockets module | |
import ipaddress | |
import socket | |
import ctypes | |
# First, we have to tell the socket we want to receive this additional data. | |
# As the socket module lacks some constants, we need to define them too. | |
IP_PKTINFO = 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == "__main__": | |
c = MlmClient() | |
c.connect("tcp://192.168.1.223:9999", 1000, "PythonTest") | |
c.set_consumer("stream", ".+") | |
msg = c.recv().popstr() | |
while (msg == "hello"): | |
print(msg) | |
msg = c.recv().popstr() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
#salaris_graph { | |
background-color: black; | |
color: white; | |
width: 400px; | |
height: 400px; | |
padding: 1em; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# | |
# A Python Asyncore Dispatcher class for ZeroMQ (PyZMQ) | |
# Copyright 2016 Arnaud Loonstra <arnaud@sphaero.org> | |
# | |
# I know Asyncore is sort of deprecated but it still used in many | |
# frameworks. Therefore this class makes it easy to implement | |
# ZeroMQ sockets into those frameworks. | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# | |
# Cast screen to kodi, sort of like Chromecast functionality | |
# | |
# original version found on reddit: | |
# https://www.reddit.com/r/kodi/comments/5googi/push_stream_of_linux_desktop_to_kodi_using_vlc/ | |
import sys | |
import time | |
import os |
OlderNewer